Re: [css-variables] a more "Classical" approach

Hi Rafal,

> $my-style, h1, $my-other-style { color: green; font-size: 120%}
> strong, $my-style { font-weight: bold}
> table tfoot a {font: $my-style}
> div.help { $my-style; border:1pt }

There is a slight misunderstanding here. The [css-variables] specs defines 
"Custom Properties". What you propose is a Macro system similar to what you 
can have in C/C++. Those are two different things which aim at solving 
different use cases (though some use cases can be solved by both approaches, 
this isn't a requirement per se).

FWIW, the “$” char has been used for Custom Properties in the past but is 
now reserved for a Macro system like the one you propose; it will be 
introduced in the coming years once Custom Properties will have more 
implementations.

Best regards,
François

_____________________
> The original proposal does allow for "if (x > 5) this.width = 10", which I 
> think is simply wrong.
This isn't quite true. The idea is that you can write almost anything in a 
custom property, including things that does not mean anything in CSS, like 
in this case; if you try to use it anywhere, it still isn't valid CSS. Maybe 
this confusing example should be removed. 

Received on Wednesday, 4 June 2014 13:28:01 UTC