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

Apply list group numbering to all items #35822

Merged
merged 3 commits into from
Feb 17, 2022

Conversation

chefarbeiter
Copy link
Contributor

I have a list group for which I have enabled numbering with list-group-numbered. This works fine. Then I had to change the list to buttons and in the process the numbering of the entries disappeared. See this example.

A quick look in the code revealed that numbering is only enabled for li elements:

> li::before {
// Increments only this instance of the section counter
content: counters(section, ".") ". ";
counter-increment: section;
}

I think this came about because the numbering in #33068 was initially only for ol elements, but then changed to an opt-in class. However, the restriction to li elements was not removed.

In this PR, I changed the selector to the list-group-item class. This applies the numbering to all possible children of a list group, whether li, button, a or label.

@chefarbeiter chefarbeiter requested a review from a team as a code owner February 10, 2022 19:38
Copy link
Member

@ffoodd ffoodd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks!

@XhmikosR XhmikosR merged commit 546e34c into twbs:main Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants