- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 29 May 2012 16:24:05 -0700
- To: Simon Sapin <simon.sapin@kozea.fr>
- Cc: Sebastian Zartner <sebastianzartner@gmx.de>, François REMY <fremycompany_pub@yahoo.fr>, shans@google.com, sylvaing@microsoft.com, florianr@opera.com, www-style@w3.org
On Tue, May 29, 2012 at 5:17 AM, Simon Sapin <simon.sapin@kozea.fr> wrote: > Le 29/05/2012 00:41, Sebastian Zartner a écrit : >> 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. > > @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. > > In their current form, CSS variables can be used in any property values but > not in descriptors. The spec probably should mention that. Yes, @page can use variables, for the reasons you state. Properties in @page can use any vars defined on the root, and you should be able to define vars in @page that are then usable inside the @margin rules, because of their inheritance rules. ~TJ
Received on Tuesday, 29 May 2012 23:24:55 UTC