Apply list group numbering to all items #35822
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:bootstrap/scss/_list-group.scss
Lines 19 to 23 in d3babf7
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 toli
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, whetherli
,button
,a
orlabel
.