twbs / twbs/bootstrap

Numbered list-groups with `start` attribute do not count correctly.

Open
#37,345 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css v5
Dominant language
MDX
Stars
175k
Forks
78.6k
Avg merge
7h 19m
Merged PRs (30d)
35

Description

Prerequisites
Describe the issue

Numbered lists with a start attribute as offset do not count correctly. For example

<ol class="list-group list-group-numbered" start=10>
  <li class="list-group-item">ten</li>
  <li class="list-group-item">eleven</li>
</ol>

start counting from 1

Reduced test cases

A second value for counter-reset fixes the offset, but I do not know how to set this dynamically:

ol.list-group-numbered[start] {
  counter-reset:section 9;
}
What operating system(s) are you seeing the problem on?

Windows, macOS, Android, iOS, Linux

What browser(s) are you seeing the problem on?

Chrome, Safari, Firefox, Microsoft Edge, Opera

What version of Bootstrap are you using?

v5.2.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reduced HTML example and inspect Bootstrap's current styles for the list-group-numbered class, especially its counter-reset behavior. Confirm how the ol start attribute should affect numbering across the listed browsers; done means a list starting at 10 displays 10, 11, and subsequent values correctly, with a regression check for the offset.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.