Skip to content

[css-counter-styles] Exclude 'none' from <counter-style-name> #1295

@SimonSapin

Description

@SimonSapin

https://drafts.csswg.org/css-counter-styles/#typedef-counter-style-name

The general form of an @counter-style rule is:

@counter-style <counter-style-name> { <declaration-list> }

where <counter-style-name> is a <custom-ident>.
If a counter style’s name is an ASCII case-insensitive match for "decimal" or "none", the @counter-style rule is invalid.

We’ve clarified in #1285 that the last sentence only applies to at-rules, and not other uses of <counter-style-name>. This makes sense for decimal which is a style that always exists (it just can’t be overridden). Allowing none however is useless since it can’t ever refer to an existing counter style.

I suggest changing the spec to make none (ASCII-case-insensitive) an invalid value of <counter-style-name> in all contexts, like CSS-wide keywords already are.

CC @upsuper, @tabatkins

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions