Skip to content
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

Add ol.list-group with pseudo-element numbers #33068

Merged
merged 3 commits into from
Mar 11, 2021
Merged

Add ol.list-group with pseudo-element numbers #33068

merged 3 commits into from
Mar 11, 2021

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