Created by: chefarbeiter
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:
https://github.com/twbs/bootstrap/blob/d3babf7d7f684daf2fb53491b3b03c3d77fdaada/scss/_list-group.scss#L19-L23
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
.