-
Notifications
You must be signed in to change notification settings - Fork 713
[css-lists-3] counter(name, none) should be invalid #4163
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
…rop 'none' value to match CSS2 #4163
The CSS Working Group just discussed The full IRC log of that discussion<fantasai> Topic: counter(name, none) should be invalid<fantasai> github: https://github.com//issues/4163 |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: counter(name, none) should be invalid<dael> github: https://github.com//issues/4163 <dael> fantasai: If you say counter(name,counter-style) it represents list using that. There is a none value that's value of list-style-type. Some impl think that's valid as a counter style. CSS 2.1 forbids that. I updated spec to match css2.1 <dael> fantasai: If people disagree and think counter(name, none) should be valid we can reconsider <dael> TabAtkins: I wrote that near 10 years ago. Can't comment on [missed] so whatever <TabAtkins> s/[missed]/justification <dael> fantasai: Objections to updating spec to match 2.1? <TabAtkins> No objection. <dael> RESOLVED: Update to match 2.1 and make counter(name, none) invalid |
…ounters(). CSSWG resolution: w3c/csswg-drafts#4163 (comment) Spec: https://drafts.csswg.org/css-lists-3/#counter-functions Differential Revision: https://phabricator.services.mozilla.com/D43893 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1576821 gecko-commit: f694356cca02c95231d7c5902e9c51e056186a2b gecko-integration-branch: autoland gecko-reviewers: emilio
…in counter()/counters(). r=emilio CSSWG resolution: w3c/csswg-drafts#4163 (comment) Spec: https://drafts.csswg.org/css-lists-3/#counter-functions Differential Revision: https://phabricator.services.mozilla.com/D43893 --HG-- extra : moz-landing-system : lando
…in counter()/counters(). r=emilio CSSWG resolution: w3c/csswg-drafts#4163 (comment) Spec: https://drafts.csswg.org/css-lists-3/#counter-functions Differential Revision: https://phabricator.services.mozilla.com/D43893
…ounters(). CSSWG resolution: w3c/csswg-drafts#4163 (comment) Spec: https://drafts.csswg.org/css-lists-3/#counter-functions Differential Revision: https://phabricator.services.mozilla.com/D43893 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1576821 gecko-commit: f694356cca02c95231d7c5902e9c51e056186a2b gecko-integration-branch: autoland gecko-reviewers: emilio
…ter()/counters(). CSSWG resolution: w3c/csswg-drafts#4163 (comment) Spec: https://drafts.csswg.org/css-lists-3/#counter-functions Differential Revision: https://phabricator.services.mozilla.com/D43893
…in counter()/counters(). r=emilio CSSWG resolution: w3c/csswg-drafts#4163 (comment) Spec: https://drafts.csswg.org/css-lists-3/#counter-functions Differential Revision: https://phabricator.services.mozilla.com/D43893 UltraBlame original commit: f694356cca02c95231d7c5902e9c51e056186a2b
…in counter()/counters(). r=emilio CSSWG resolution: w3c/csswg-drafts#4163 (comment) Spec: https://drafts.csswg.org/css-lists-3/#counter-functions Differential Revision: https://phabricator.services.mozilla.com/D43893 UltraBlame original commit: f694356cca02c95231d7c5902e9c51e056186a2b
…in counter()/counters(). r=emilio CSSWG resolution: w3c/csswg-drafts#4163 (comment) Spec: https://drafts.csswg.org/css-lists-3/#counter-functions Differential Revision: https://phabricator.services.mozilla.com/D43893 UltraBlame original commit: f694356cca02c95231d7c5902e9c51e056186a2b
I realise this is closed and CSS 2.1 is long since outdated, but just wanted to note that although "none" wasn't allowed in CSS 2, the final line of the example at https://www.w3.org/TR/CSS21/generate.html#counter-styles has P:before { content: counter(p, none) } and the text above that example explicitly states "All the styles are allowed, including 'disc', 'circle', 'square', and 'none'." |
Yes, it looks like the resolution here actually caused the inconsistency between the specs. 😅 See also the discussion in #5795. Sebastian |
…in counter()/counters(). r=emilio CSSWG resolution: w3c/csswg-drafts#4163 (comment) Spec: https://drafts.csswg.org/css-lists-3/#counter-functions Differential Revision: https://phabricator.services.mozilla.com/D43893
In CSS2,
counter(name, none)
andcounters(name, "string", none)
were both invalid, asnone
was not allowed incounters()
. See definition of counter functions in CSS2In the CSS Lists Level 3 drafts, it was allowed, but it caused the function to return the empty string.
Meanwhile, in Chrome and Firefox,
none
is valid, and it represents a counter style that returns the empty string (which incounters()
, is not the same thing as simply returning the empty string). TestcaseWrt the css-lists-3 behavior, I can't think of any use case. If you want the empty string, you can just write
""
. As for the behavior implemented in Chrome and Firefox for counters(), it seems really odd, as it just generates a series of (n-1) copies of a string for a counter nesting depth of n?I'm updating the css-lists-3 spec to match CSS2, because that's our reference spec for these features and we're supposed to sync with it. Filing this issue to track that and in case anyone wants to argue for matching Chrome & Firefox.
CC @MatsPalmgren @dbaron @tabatkins @jensimmons @LeaVerou
The text was updated successfully, but these errors were encountered: