W3C home > Mailing lists > Public > www-style@w3.org > June 2012

Re: [css-variables] Variables in @page

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Fri, 01 Jun 2012 15:33:41 +0200
Message-ID: <4FC8C4B5.1080202@kozea.fr>
To: Sebastian Zartner <sebastianzartner@gmx.de>
CC: jackalmage@gmail.com, www-style@w3.org, florianr@opera.com, sylvaing@microsoft.com, shans@google.com, fremycompany_pub@yahoo.fr
Le 01/06/2012 13:59, Sebastian Zartner a écrit :
>> 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.

I was only describing the current draft as I understand it, but I can 
imagine how this is a problem. Suggestion to fix it:

1. Descriptors in @-rules can use variables defined on the root element.

This matches the fact that @page inherits from the root element, except 
that descriptors themselves are not properties and thus do not inherit.

Extended proposition:

2. @-rules that accept descriptors can also define variables. Such 
definitions are scoped to the same @-rule block.


>> @page however contains real properties, as do margin rules inside
>> @page. In fact, in recent css3-page drafts, @page inherits from the
>> root element and margin boxes inherit from @page.
> I have to say that this is confusing. I believe @-rules shouldn't be
> influenced by the cascade. But that's another topic.

I disagree: I think it makes sense that properties (not descriptors) 
cascade somehow, wherever they are defined. But it is another topic 
indeed. Let’s start another thread on [css3-page] if this needs more 
discussion.

-- 
Simon Sapin
Received on Friday, 1 June 2012 13:34:13 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:55 GMT