Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !35822

Apply list group numbering to all items

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/chefarbeiter/numbered-list-group-items into main Feb 10, 2022
  • Overview 2
  • Commits 3
  • Pipelines 0
  • Changes 1

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/chefarbeiter/numbered-list-group-items