Re: CSS variable syntax

> I'm not familiar with what @ is being used for.
> Why couldn't variables start with @?

They are being used for at-rules, like @media, @page or @supports. The CSS 
WG doesn't want to overload the @ symbol with two things which are clearly 
unrelated. Also, there have been proposals where people wanted to embed 
@rules inside selector rules in the past, so we should leave that door open.

> Why would it be difficult to implement this so
> that --foo in a property value means get the
> value of the foo property, making var(--foo)
> unnecessary?

This discussion already happened, in fact; please have a look for example at 
[1]. That being said, I agree with you and I think others do, too. There is 
(however) no major reason why we couldn't try to use "var" alone and then 
introduce a shorter syntax later on if it happens to be needed or heavily 
requested by users. You know, "var()" allows to do cool things like provide 
a default value, something you can't do with the keyword alone. (Well, I 
proposed to add an operator to "calc" to solve this but it didn't get much 
traction [2]).

Best regards,
François

________________________
[1] http://lists.w3.org/Archives/Public/www-style/2014Mar/0588.html
[2] as in "calc(--col-span * --col-width || --col-width || 0px)" // this 
makes var(..., ...) unnecessary 

Received on Thursday, 3 April 2014 16:42:40 UTC