Re: [csswg-drafts] [css-lists] Contradictory normative requirements for implicit 'list-item' counter? (#4167)

It's worth looking a little more closely at what this requirement is trying to say:

> UAs and host languages should ensure that the list-item counter values reflect the underlying numeric value dictated by host language semantics when setting up list item styling in their UA style sheet and presentational hint style mappings.

For HTML, "setting up list item styling in their UA style sheet and presentational hint style mappings" will need to correspond to something like (and I'm not yet entirely sure of these rules):
```
ol[reversed] > li { counter-increment: list-item -1; }
ol[reversed] { counter-reset: list-item calc(<child-count>+1); }  /* alternately counter-set */
ol[start] { counter-reset: list-item calc(attr(start integer) - 1); } /* alternately counter-set */
li[value} { counter-set: list-item attr(value integer); }
```

There needs to be a "by default" in that sentence, so I'll fix that at least.

> For example, given ... what happens?

I'll assume you meant those selectors to be `li` rather than `ol`?

Most of the example you give is pretty straightforward if we take the idea that list-item counters are set up by the UA, and they're overrideable by authors. What's interesting is what happens when one applies `counter-increment: 2` to a reversed list. It'll definitely be weird...

CC @MatsPalmgren

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

Received on Friday, 2 August 2019 09:30:25 UTC