Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to declare ties in ordered lists #10443

Open
simevidas opened this issue Jun 27, 2024 · 0 comments
Open

A way to declare ties in ordered lists #10443

simevidas opened this issue Jun 27, 2024 · 0 comments
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest

Comments

@simevidas
Copy link

simevidas commented Jun 27, 2024

What problem are you trying to solve?

Sometimes in an ordered list, two or more items are tied. You usually represent this by repeating the ordinal number for the tied items. For example:

1. Germany
2. Italy
2. France
4. Spain
5. England

In this example, Italy and France are tied, so they’re both in second place, but Spain is in fourth place because there are three items above it.

What solutions exist today?

Currently, you have to manually set value attributes:

<ol>
  <li>Germany</li>
  <li>Italy</li>
  <li value=2>France</li>
  <li value=4>Spain</li>
  <li>England</li>
</ol>

How would you solve it?

It would be useful if you could just declare a value repetition on France via something like value=repeat:

<ol>
  <li>Germany</li>
  <li>Italy</li>
  <li value=repeat>France</li>
  <li>Spain</li>
  <li>England</li>
</ol>

This would instruct the browser to repeat the value, so France would get Italy’s value (2.), but the list-item counter would not be affected, so Spain would get 4. normally. In other words, value=repeat would tell the browser to not render the list-item counter value for that item but to instead render the same value that the preceding item has.

Anything else?

Related Mastodon discussion: https://mastodon.social/@simevidas/112689323328071444

@simevidas simevidas added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest
Development

No branches or pull requests

1 participant