Re: [csswg-drafts] [css-lists] CSS counter scope/inheritance is incompatible with HTML ordinals (#5477)

Slightly nervous about this one. Can I propose a fourth option which might be lower impact?

4. Change the counter rules so that `counter-reset` is applied _after_ `counter-increment` and `counter-set` (it's currently applied before). Then you can cater for the invalid markup with this in a UA sheet.
```css
ol > ol { counter-increment: list-item; counter-reset: list-item }
```
The outer-scoped list-item will be incremented, then a new scope is created with the counter value of 1.

The only impact that would have is on elements that have both a `counter-reset` and `counter-increment` - a pointless combination as the rules are currently defined (and also one that can be searched for to see how often its used). It feels like this approach might have less unintended side-effects.

-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5477#issuecomment-681751059 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 27 August 2020 08:10:52 UTC