Re: [csswg-drafts] [css-syntax-3] Is two hyphens a valid identifier? (#5764)

@Loirooriol wrote: 
> @tabatkins The problem is that the non-normative description in https://www.w3.org/TR/css-syntax-3/#syntax-description seems to imply otherwise

@Masa-Shin wrote:
> [This diagram](https://www.w3.org/TR/css-syntax-3/#ident-token-diagram) and the [Class selectors section](https://www.w3.org/TR/selectors/#class-html) implies `.--` is valid for class selector. While in the [Description of CSS’s Syntax section](https://www.w3.org/TR/css-syntax-3/#syntax-description) it says the contrary:
> 
> > Property names and at-rule names are always identifiers, which have to start with a letter or a hyphen followed by a letter, and then can contain letters, numbers, hyphens, or underscores.

The syntax description only refers to *property names* and *at-rule names*, it doesn't say anything about class names.

The paragraph below that refers to the Selectors specification for the syntax of selectors.

The non-normative paragraph is still wrong, though, because it doesn't account for custom property names which *do* start with two hyphens. (And custom at-rule names will probably also use the two-hyphens prefix when they are introduced.)

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5764#issuecomment-780800175 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 17 February 2021 19:35:42 UTC