A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

[ idea ] Set current ol li auto increment as CSS reference-able attribute

D7460N
2022-01-27

Allow OL LI auto increment to be set as an LI element attribute. This would allow CSS (or whatever) to reference <li>s with auto-generated unique identifiers.

<ol>
  <li data-count="currentLiIncrement">list item</li>
  <li data-count="currentLiIncrement">list item</li>
  <li data-count="currentLiIncrement">list item</li>
</ol>

WDYT?

Thank you in advance.

simevidas
2022-01-30

Could you describe a use-case? How would you use this feature?