-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-lists-3] counter-set vs counter-increment #3810
Comments
It also gives better cascading behavior in general (not just for the author/ua list-item negotiation). |
Does If there's no compatibility objections, I agree that it is preferable if The downside is that |
There's Gecko's implementation, but that's not on release yet so we can change that without much hassle I'd guess. But I'd rather get a speedy resolution than doing it once it's hit release. cc @MatsPalmgren in case he has objections. |
I like this proposal. It makes (I'm fixing Gecko here.) |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic:apply counter-set after counter-increment<dael> github: https://github.com//issues/3810 <dael> fantasai: This was an issue around interaction. Property values you have to set if you're incremeneting on every item and want to set to a particular value. yOu have to set it minus increment. That's ergonomically awk <fremy> (I'm in favor) <dael> fantasai: Suggestion is set counter set after increment so if you set foo 5 it will be 5 no matter the counter increment <dael> fantasai: Generally better cascading behavior. Counterset wins over counter incrememnt rather than adding to it. <dael> gregwhitworth: When you set counterset it starts from that place? <dael> fantasai: Sets an explicit value for the counter <dael> gregwhitworth: And doesn't inc after that? <dael> fantasai: If you have nth-child 5 counterset: chapter 5 it will have 5 instead of the increment added to that. <dael> gregwhitworth: Then increment from 5? <dael> fantasai: On other elements, yeah. <dael> fantasai: On a particular element you apply counter-reset then counter increment then counter set <dael> plinss: Makes sense to me. Looking at issue Gecko impl but will change. Any other impl here? <dael> fantasai: I think they're only ones. They committed the fix a day ago <dael> plinss: Objections? <dael> RESOLVED: apply counter-set after counter-increment |
…he increment, so they don't compound). #3810
Re: Counter properties in CSS Lists Editor's Draft
There's some ergonomc awkwardness about
counter-set
vscounter-increment
, e.g. in #3686 it's pointed out that you'd have to zero out the list-item increment when setting the counter for<li value=...>
. (This particular case is technically problematic as well as unweildy because it'd get wiped out by an authorcounter-increment
declaration; but there's some awkwardness either way and it doesn't cascade well for anyone.)I'm wondering if instead of applying
counter-reset
, thencounter-set
, thencounter-increment
, we should applycounter-reset
, thencounter-increment
, thencounter-set
? Then when you “set” a counter on an element, you actually get that value back, which seems a little more intuitive (and also solves the list-item problem).The text was updated successfully, but these errors were encountered: