Skip to content

Does Not Correctly Parse a '--' Ident #298

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

Closed
Alexhuszagh opened this issue Apr 12, 2021 · 1 comment
Closed

Does Not Correctly Parse a '--' Ident #298

Alexhuszagh opened this issue Apr 12, 2021 · 1 comment

Comments

@Alexhuszagh
Copy link

Alexhuszagh commented Apr 12, 2021

Using the web service, with the following example, we get a CSS parse error:

.myButton {
  --: 0px;
}

The following warning is produced:

Parse Error --: 0px; 

However, according to the current CSS Level 3 syntax, -- is a valid identifier start, and all identifier starts do not need to be followed by other tokens in order to form a valid <ident-token>. I understand this is a fairly unusual edge-case.

Other standard conforming examples below all parse:

.myButton1 {
  --background: 0px;
}

.myButton2 {
  -background: 0px;
}

.myButton3 {
  -\21: 0px;
}

.myButton4 {
  -\ : 0px;
}

.myButton5 {
  -\:: 0px;
}

.myButton6 {
    -\AF12 a123: 0px
}

While invalid CSS fails:

.myButton1 {
  -\
: 0px;
}

In short, the CSS grammar for parsing <ident-tokens> is correct in all other examples, and fully conforms to the specifications, including escape tokens. However, -- is not properly handled.

@ylafon
Copy link
Member

ylafon commented Aug 31, 2021

fixed (partially) by #316

@ylafon ylafon closed this as completed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants