-
Notifications
You must be signed in to change notification settings - Fork 714
[css-lists-3] Inconsist counter()
syntax between CSS 2 and 3
#5795
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
It was already agreed on to make As the definition in CSS Lists 3 supercedes the one in CSS 2 (and CSS 2.2) and already excludes If something needs to be corrected, it is CSS 2.2 that still says that Sebastian |
So what's strange here is that #4163 claimed that a |
@Loirooriol https://www.w3.org/TR/CSS2/generate.html#content
Generally-speaking, prose restrictions override grammar leniency. Agree with @SebastianZ that the example in syndata.html needs to be fixed, though. :/ That's definitely self-inconsistent. |
@fantasai Precisely, it says "The name must not be 'none'", given |
Also note https://www.w3.org/TR/CSS2/generate.html#counter-styles says
|
@Loirooriol is right. The initial claim in #4163 that Though I agree with @xiaochengh that neither Sebastian |
Should
content: counter(c, none)
be a parse-time failure, or a valid value that generates empty text?In CSS 2.1:
counter() = counter(name, <list-style-type>?)
[1], where<list-style-type> = disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit
[2]So
content: counter(c, none)
is a valid declaration that doesn't generate any text. Chrome implements this behavior.In CSS 3:
counter() = counter( <counter-name>, <counter-style>? )
[3], where<counter-style> = <counter-style-name> | <symbols()>
[4], where<counter-style-name>
is a<custom-ident>
that is not an ASCII case-insensitive match for "none". [5]So
content: counter(c, none)
is invalid at parse time. Firefox implements this behavior.My proposal: We should not allow
none
. Allowingnone
in CSS 2.1 looks like a spec bug to me, since it provides little value and doesn't make too much sense. (And the same syntax also allowsinherit
, which makes no sense at all).[1] https://www.w3.org/TR/CSS2/generate.html#counter-styles
[2] https://www.w3.org/TR/CSS2/generate.html#propdef-list-style-type
[3] https://drafts.csswg.org/css-lists-3/#counter-functions
[4] https://drafts.csswg.org/css-counter-styles-3/#typedef-counter-style
[5] https://drafts.csswg.org/css-counter-styles-3/#typedef-counter-style-name
The text was updated successfully, but these errors were encountered: