CSS variables notation looks like this --var which is very different to what we're used to using in other programming languages.
Wouldn't it be easy for them to just do it like how SASS ($var) or LESS (@var) does it?
What's the reason behind having this unusual syntax?
The @ has already special meaning in CSS.
I can't remember to see the $ in CSS. So this could have been a possibility.
But CSS custom properties are a bit more then just plain variables in SASS or LESS. Maybe they want to distance themselves from $ therefore.
I think that the kebab style looks nice and consistent. :)
Denny Trebbin
Lead Fullstack Developer. Experimenting with bleeding-edge tech. Irregularly DJ. Hobby drone pilot. Amateur photographer.
CSS custom properties need to be parsable not only by the CSS parser; you also have access from JavaScript. In the public mailing list, it's not discussed why
--has won the prefix race. The CSS work group guys just defined--as a prefix for custom properties and values.