Re: [css-variables] Variables in @page

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 UTC