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

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 UTC