-
Notifications
You must be signed in to change notification settings - Fork 679
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-pseudo][css-lists] Allow counter-* in ::marker #5265
Comments
My current thoughts on ::marker's property list is, for simplicity, until we have a layout model for 'outside', we keep it as short as possible while satisfying the main author use cases and implementer concerns. Is there a particular use case you have in mind? |
I just wanted something like ol {
counter-reset: my-counter;
}
::marker {
counter-increment: my-counter;
content: "[" counter(my-counter) "]";
} Sure, I can set Or I could forget about So it's not a big deal, but it seems unexpected to me that, given ::marker can read counter values, it can't change them. And changing counters seems completely independent of the outside layout model. |
@Loirooriol Why wouldn't you just set the counter-increment on the li? Wouldn't that make more sense anyway? |
@fantasai I don't know, when using counters in ::before, it's not uncommon for me to increment them in ::before too, this avoids needing an extra rule. So it just seems a bit unexpected to me that I can't do the same for ::marker. |
Seconded @Loirooriol, I also often increment in |
@fantasai I think your reasoning from #6005 also applies here:
Since they are mostly about style computation rather than layout, they should be fine in ::marker. Transitions and animations are already allowed, counters and quotes are missing. But yeah, low priority. |
The ::marker pseudo-element can use
However, something like
counter-increment: my-counter
won't work sincecounter-increment
doesn't apply to ::marker. Gotcha, it has to be set in the list item instead.So I think
counter-increment
,counter-set
andcounter-reset
should just apply. Counters don't affect layout so there doesn't seem to be any problem.The text was updated successfully, but these errors were encountered: