Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mdo
Copy link
Member

@mdo mdo commented Feb 12, 2021

Fixes #26202, closes #32244.

Originally mentioned by me at #32244 (comment).


Uses generated content via CSS to add the numbers inside list group items. This is done because the styling available for normal ordered/numbered lists affords basically no ability to style, place, align, etc the numbers. This way, people can apply their own custom styles to the ::before element and match or differentiate them as desired.

Preview: https://deploy-preview-33068--twbs-bootstrap.netlify.app/docs/5.0/components/list-group/#ordered-list

@mdo mdo requested a review from a team as a code owner February 12, 2021 18:53
@mdo
Copy link
Member Author

mdo commented Feb 12, 2021

No need to add this in the next beta IMO, so slating for either v5-stable or v5.1.

@XhmikosR XhmikosR changed the title Add ol.list-group with psuedo-element numbers Add ol.list-group with pseudo-element numbers Feb 12, 2021
@septatrix
Copy link
Contributor

I would think this is better suited for an additional class. I for one often use .list-group with ordered lists (for semantical/accessibility reasons) but like not having the numbers show.

@mdo
Copy link
Member Author

mdo commented Mar 11, 2021

Updated to use a class so that it's opt-in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why hide the numbers in an ordered list?
3 participants