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

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 UTC