W3C home > Mailing lists > Public > www-style@w3.org > August 2001

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

From: Tantek Celik <tantek@cs.stanford.edu>
Date: Fri, 10 Aug 2001 18:48:34 -0700
To: Boris Zbarsky <bzbarsky@MIT.EDU>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <1214628066-412689177@psdbay.com>
From: Boris Zbarsky <bzbarsky@MIT.EDU>
To: www-style@w3.org
Subject: At-rules (@-rules) in @media blocks
Date: Fri, Aug 10, 2001, 9:21 AM

> I'm a bit confused about the use of at-rules in @media blocks...
>
> The CSS2 grammar says:
>
> media
>        : MEDIA_SYM S* medium [ ',' S* medium ]* '{' S* ruleset* '}' S*
>        ;
> medium
>        : IDENT S*
>        ;
>
> thus implying that at-rules are not allowed in @media blocks.

Correct.

> However, the main body of the specification itself never says this.

It doesn't need to.  The main body of the specification can (and sometimes
does) add additional constraints which are not reflected in the grammar, but
the prose never removes constraints.

> 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.

Tantek

----------------------------------------------------------------------------
Browse Different.                           http://www.microsoft.com/mac/ie/
Received on Friday, 10 August 2001 21:47:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:10 GMT