-
Notifications
You must be signed in to change notification settings - Fork 719
[css-counter-style] overriding symbolic counter styles. #3584
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
Comments
(I basically find it a bit silly that I need to pay hash lookups in parts of Gecko to paint a square :)) |
A more concrete proposal: Can we prevent from overriding It's not a huge deal if not I guess, but it's somewhat unfortunate. |
The reason is that, theoretically, once you implement @counter-style you can just move all your built-in counter styles to being defined by the UA style sheet. We include the minimum amount of magic names to allow us to do reasonable fallback, and otherwise assume that this is exactly what happens, so all the other styles can be overridden. That said, I don't care and don't think it's important; if you want more disallowed names I'm okay with that. |
The argument for those four counter styles to be non-overridable is that, browsers have special rendering code for them, so not needing to go through the counter style resolution may simplify / accelerate some handling for certain implementation strategies. |
Like I said, I'm fine with that. The current list is just a minimal list (tho... I forget why I added |
For reference, |
Agenda+ to see if we still want to make the list of simple symbolic styles that Emilio lists (circle, square, disclosure-open, and disclosure-closed) non-overridable. As I said in earlier comments, I'm fine with doing more non-overridable values, if UAs want it. |
If we resolve for this proposal, #6201 becomes a non issue; the special formatting for The disclosures I'm less sure on; first because we don't have the legacy issues we do with the other three, but mainly because the special handling that comes with |
@faceless2 While this simplifies #6201, I don't think it becomes a non-issue, because even if you can't override symbolic counters, I guess you can extend them like |
Hmm, good point. I agree the question to resolve is - if a "special" counter like disc, circle, square is extended, does it remain special? If we try and propagate this "specialness" through inheritance, I can see it getting quite complex. @counter-style my-circle { system: extends circle; suffix: ":" } /* circle or \25E6? */
@counter-style my-circle2 { system: extends circle; symbols: \25E6 } /* circle or \25E6? */
@counter-style my-circle3 { system: extends square; symbols: \25E6 } /* circle or \25E6? */
@counter-style tmp { system: extends disc; symbols: A }
@counter-style my-circle5 { system: extends tmp; symbols: \25E6 } /* circle or \25E6? */ I guess there are probably three options:
I can see an argument for 1 or 2, but not 3 myself - it starts to get weird and complex for what is, ultimately, something we're only doing for compatibility. |
Yeah, I think we should just do the simplest thing there. At least 2, but I'd be fine with 1. |
2 implies that part of the marker may be normal text (like prefix and suffix), and part may be special (symbol). This seems unnecessarily tricky to implement. I prefer 1, which is what Chromium and Firefox currently do. Anyways, this discussion seems more suited for #6201. |
The CSS Working Group just discussed
The full IRC log of that discussion |
Oops it seems only one resolution is recorded by the bot. |
Official minutes at https://lists.w3.org/Archives/Public/www-style/2021Jun/0005.html |
…able, and specify that extending them uses the spec version, not the UA exception. #3584
This CL follows from a recent spec revision that made all predefined symbolic counter styles non-overridable: w3c/csswg-drafts#3584 (comment) Bug: 1218770 Change-Id: Id28e0e0c74dfc5659552d709078562f9621ccccf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3032917 Reviewed-by: Ian KilpatrickCommit-Queue: Xiaocheng Hu Cr-Commit-Position: refs/heads/master@{#902526}
Counter styles allows to override built-in counter styles (except for
none
/disc
/decimal
). Is there any use-case to justify doing this? Can we at least disallow overriding the list-style types?/cc @upsuper @tabatkins
The text was updated successfully, but these errors were encountered: