Re: At-rules (@-rules) in @media blocks

* Tantek Celik wrote:
>> It
>> just says that "a set of rules" is allowed inside an @media block.....
>> In particular, it seems to me that @page and @font-face rules should be
>> acceptable in @media blocks.
>
>I don't know about "should".  From an implementation/simplicity standpoint,
>it is better to disallow @-rules inside @media.

They are allowed by the generic syntax in section 4.1.1 of CSS Level 2,
so the parser propably recognizes them. The alternative for @page is, to
quote myself in news:3c2b246b.109342886@news.bjoern.hoehrmann.de in
news:comp.infosystems.www.authoring.stylesheets, where this discussion
was raised:

  | [...]
  |  @page projection  { size: landscape           }
  |  @page print       { size: 9cm 18cm            }
  |  
  |  @media print      { body { page: print      } }
  |  @media projection { body { page: projection } }
  | [...]

I won't call that "simple". Even more quoting:

  | [...]
  |  Not elegant but possible. The alternative is to use external
  |  
  |    <link media="print"      ... />
  |    <link media="projection" ... />
  |  
  |  information.
  | [...]

That would for the implementation be basically the same thing as

  @media print      { @page { /* ... */ } }
  @media projection { @page { /* ... */ } }

So I don't see where forbidding @page in @media makes CSS easier to
implement or "simpler" for authors :-)
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/

Received on Saturday, 11 August 2001 02:36:30 UTC