CSS custom property or variable gives validation error but why

CSS custom property or variable gives validation error but why
0

#1
:root {
  --bgcolour: #ffffd0;
  --bqindents: 40px;
  --warningtextsize: 125%;
}

When I validate above code it gets validation error.
jigsaw’s css validator


#2

CSS variables are declared with two --

--main-color: black; /* vs */
-main-color: black; 

Hope it helps :+1:


#3

Is this an FCC challenge or just something you’re trying to do? We need a little bit more context, we can’t see what’s in front of you - it’s impossible to tell what your issue is without you explaining what you’re trying to do.


#4

Im trying to use css custom property . I edited original post .:wink:


#5
  1. The CSS validator doesn’t support them and the issue requesting it be to fixed (which has been open for a year) has now been closed, I assume because
  2. They’re still at candidate recommendation stage, ie the W3 is using implementation by browsers to gather evidence to push it to the next stage, ie it is not part of the full standard as of yet, so
  3. there’s no pressing reason to fix the validator

The CSS validator isn’t a particularly important thing so just ignore it, in this case it’s not validating valid code