browser error while declaring CSS3 variables, Expected RBRACE, This rule looks for recoverable syntax error

2.3k views Asked by At

I am trying to use variables in my CSS3 file, I have used following code

:root{
--nvc-theme: green;
--nvc-themelite: grey;
}

this is the css I am using to declare two variables in my project but when I compile CSS with csslint it is showing error

ERROR: Expected RBRACE at line 17, col 3. This rule looks for recoverable syntax 
errors. (errors) Browsers: All

and it is also showing

WARNING: Rule is empty. Rules without any properties specified should be removed.
 (empty-rules) Browsers: All

I know this warning because in the root element I have used only variables I didn't declare any css properties just variables so it is showing a warning, but how can I overcome this situation. Any solution helps a lot. Thank you

1

There are 1 answers

2
gbjbaanb On

Given an outstanding issue on github for this problem, and another issue asking "Is anyone here?" with no response from the devs and no real way to merge fix in, it doesn't seem this will be fixed any time soon.

So your only real option is to migrate to a different lint such as stylelint