Re: [css-variables] Variables in @page

Am 01.06.2012 13:59 schrieb Sebastian Zartner:
>>> As I understand the current model and pointed out earlier the current
>>> concept is limited to the element tree. People won't be able to put
>>> something into a variable that is not inside of it, i.e. @-rules
>>> defining font faces, counter styles, page styles etc. Please let me
>>> know if I am wrong in this point.
>>
>> I think that @page could contain variables.
>>
>> Many @-rules like @font-face or @counter-style contain *descriptors*.
>> Descriptors have the same "name: value;" syntax as properties, but
>> that’s it. They can not have !important and are not part of the cascade.
> That's the point. People might want to have variables available everywhere, not just in the cascade.

Having CSS variables available in the @media HTML attribute could solve 
an issue about responsive images. Whatever their final 
<picture>/<pic>/<img> syntax will be, Matthew Wilcox stated that it is a 
problem to have MQs in the HTML code for images, as this mixes design 
questions (defining breakpoints) into HTML content.
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-May/036178.html

Florian Rivoal stated that CSS variables in their current form cannot be 
used in the @media attribute:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-May/036181.html

So this would be a use case for allowing CSS variables that are 
available outside the cascade?

Received on Saturday, 2 June 2012 09:33:47 UTC