question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
nkdas91commented, Oct 25, 2022

My two cents! We can use CSS variables.

<ol start="10" class="list-group list-group-numbered" style="--list-start: 10;">
  <li class="list-group-item">list item</li>
  <li class="list-group-item">list item</li>
  <li class="list-group-item">list item</li>
  <li class="list-group-item">list item</li>
</ol>
.list-group-numbered {
  counter-reset: section var(--list-start, 0) !important;
}

https://codepen.io/nkdas91/pen/xxzxXjE

0reactions
mdocommented, Oct 23, 2022

Oh my bad! Reopening.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML ol start Attribute - W3Schools
The start attribute specifies the start value of the first list item in an ordered list. This value is always an integer, even...
Read more >
listGroups | REST API - DocuSign Developers
The zero-based index of the result from which to start returning results. Use with count to limit the number of results. The default...
Read more >
Can I style numbering an ordered list that has a start attribute ...
Is it possible to serialize the list-style numbering on an ordered list using the value in start attribute instead of 1 ? No...
Read more >
Groups API - GitLab Docs
with_custom_attributes, boolean, no, Include custom attributes in response ... parameter is not provided, the API returns the projects ordered by name .
Read more >
ListGroups - Identity Store - AWS Documentation
Lists all groups in the identity store. Returns a paginated list of complete Group objects. Filtering for a Group by the DisplayName attribute...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found