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

As a general principle, I prefer to minimize the amount of magic in CSS that depends on document semantics: if we can describe HTML's behavior using CSS mechanisms, where HTML's interaction is limited to injecting regular CSS declarations into the cascade rather than applying specialized knowledge of the HTML vocabulary during layout / at used-value time, I think that's better.

Let's be clear the issue here isn't about list-item increments in general: the default increment that we apply to list-item display types works fine for HTML list numbering in almost all cases. The exception is for reversed lists, and I think it's fine to handle that through the UA style sheet. I don't think it's factual to say that it "doesn't work": it clearly does work, and there aren't, as far as I am aware, any web-compat concerns with doing it that way.

If there's a problem with reversing list numbering through a rule like `ol { counter-increment: list-item -1; }`, then I think we should take @FremyCompany's suggestion in https://github.com/w3c/csswg-drafts/issues/3686#issuecomment-479432491 and introduce a property to control the automatic increment, e.g. `ol { list-increment: -1; }`. But I think reversed lists are unusual enough that just using `counter-increment` rule should be sufficient.

CC @MatsPalmgren @dbaron @domenic 

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

Received on Thursday, 8 August 2019 17:08:58 UTC