W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2019

Re: [csswg-drafts] [css-lists-3] Should automatic list-item increment adjust for ol[reversed]? (#4181)

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Sat, 17 Aug 2019 02:18:04 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-522196318-1566008282-sysbot+gh@w3.org>
If we aren't dealing with a Web-compat issue over numbering `list-item` descendants of an `ol[reversed]` that *aren't* `li` elements, I think my preference here would be to define a `list-increment` property that increments a `list-item` counter but only on `display: list-item` boxes.

Then the UA style sheet can say `ol[reversed] > li { list-increment: -1; }`, and anyone who wants to turn off the increment can write `X { list-increment: none; }` without disturbing any `counter-increment` declarations or instantiating a superfluous `list-item` counter (that might then show up in `li:marker { content: counters(list-item, ".") }`, which is a little nice.

Wrt Web-compat, I don't think structures like the following are particularly common? This is what would change--because we wouldn't be reversing the numbering on that DIV.
```
<ol reversed>
  <li>three
      <div style="display: list-item">two</div>
   <li>one
</ol>
```


-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4181#issuecomment-522196318 using your GitHub account
Received on Saturday, 17 August 2019 02:18:05 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:52 UTC