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

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

From: Tuukka Tolvanen <t.wsw@lament.cjb.net>
Date: Sat, 11 Aug 2001 22:15:55 +0300
Message-ID: <3B75846B.2000009@lament.cjb.net>
To: Tantek Celik <tantek@cs.stanford.edu>
CC: Bjoern Hoehrmann <derhoermi@gmx.net>, Boris Zbarsky <bzbarsky@MIT.EDU>, "www-style@w3.org" <www-style@w3.org>
Tantek Celik wrote:

 > No no.  Just use media dependent @import and stick the rules in separate
 > style sheet.  Works fine today for UAs that support @import and @page.
 >
 > @import "printsheet.css" print;
 > @import "projsheet.css" projection;
 >
 > ...
 >
 > /* printsheet.css */
 > @page { /* ... */ }
 >
 > ...
 >
 > /* projsheet.css */
 > @page { /* ... */ }

[...]

 > In CSS2, there is no nesting of @-rules at all.  This greatly simplifies

[...]

 > It makes style sheets easier to read.  CSS is supposed to be easy to 
write
 > AND read.

Your example above sure looks like nesting to me, it just forces you to 
put things in (and read, and download) separate files. In the case of a 
short stylesheet, that's just unnecessary complication that does not 
help you read or write it.

Seems messy having separate features like nesting and importing bundled 
into @import.

 > If you could nest 15 levels of @-rules, style sheets would begin looking
 > like C++ files, and I don't think you want that.

If you were to use @import to nest 15 levels of @-rules, I don't think 
the result would always be signifigantly prettier.

't.
Received on Saturday, 11 August 2001 15:16:46 GMT

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