-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak list-group
to show numbers on list items when used on an <ol>
#32244
Conversation
62f4766
to
6f9d8d7
Compare
as expected, this fails linting because of the qualifying selector. if we feel this is acceptable, can add the extra comment that tells the linter to ignore it... |
Please try and move all the lorem ipsum changes to a separate PR. :) Also, I'm not sure if this should be backported; only if it the change isn't considered a breaking one. |
e07fd3b
to
6f9d8d7
Compare
yeah that was an accident, hadn't switched branches... :)
fair enough, happy for this to be v5 only |
If we add a new class to handle this as a variant, it could be backported. If we're using the qualifying selector, it should'nt. Using one or another depends on whether we consider this as a design thing, or as a semantic thing:
I'd be in favor of enforcing semantic by applying it to |
Just to point out that unfortunately there are cases where people don't control the HTML (CMS etc). |
Regarding CMSes, most of them allows to use (un)ordered lists since AFAIK all of them are using a WYSIWYG (like TinyMCE and/or Gutenberg for WordPress, or CKEditor for Drupal). Themes, plugins and modules can mess this up, but we can't consider all of them—and moreover, requiring a class is not easier than a specific element, in any case I can think of. |
one option i did not mention in the opener (and the original comment): could also be an additional modifier it just gets a bit verbose, but less verbose than hanging it off of individual list items i guess i.e. this
but not ALSO having |
The above might be the best approach, indeed. 👍 |
I don't think so, since it'd basically allow any BTW if you choose to use this approach, it'd be more relevant to create something like |
well, if applied to so, are we saying we want an entire set of (this is where the various philosophies on how this should best be handled clash ... i don't particularly care either way, as i'm not a purist ... adding it directly to |
I'd be for
Well, in that case |
I'm not a fan of adding this since it would require even more work to make the numbers hanging inside the list items. If folks want a count, I feel we should encourage them to do it in other ways. As it stands now, this is an incomplete measure, and feels not very useful. |
what do you mean? the styles in this PR (whichever way we go here in terms of approach) take care of that https://deploy-preview-32244--twbs-bootstrap.netlify.app/docs/5.0/components/list-group/#basic-example
like, how then? really struggling to understand why you're so set against this, @mdo |
I stand by Patrick. An I've tweaked the Scss a bit, and made more use of nesting in the last commit. Also fixed the linting issue. |
Sorry, thought I added a screenshot to show you what I mean. The issue is with longer strings of text that wrap to new lines. Doesn't look good to me, nor does it account for other layouts inside the list group items. In my view, the list group is rarely a set of single-line text—our docs examples further down the page show this. It's intended to be a versatile component overall. This feels like an incomplete measure given it doesn't solve for that. |
ah, i see what you mean @mdo ... i still think though that, at least as a starting point, this SC / allowing to use it's basically the choice of:
I'd still lean towards the former. |
I get that. I just want to see if we can do more than provide something that feels incomplete to me. We know folks will try to do more and run into this issue, and then we'll be expected to fix it. Let's at least hold on this until after beta 1. |
Updated project to Beta 2 per last comment. |
Coming back to this, hoping to take this CodePen demo from one-off to something customizable and workable for this. https://codepen.io/emdeoh/pen/abmQarE Any immediate thoughts? |
quite liking the look of that. what customisation options were you thinking? variables to change the appearance of the counters (colour, font-weight, etc)? |
Opened #33068. Safe to close this I think? |
sure |
Closes #26202
Per my comment there, I'm not sure which approach would be best/most palatable to take. This PR goes for the simplest/most surgical one, but I know this goes against the grain of targetting specific elements and using child selectors. Then again, the alternative becomes overly verbose...
Preview: https://deploy-preview-32244--twbs-bootstrap.netlify.app/docs/5.0/components/list-group/#basic-example