[thelist] @media and @import

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Mon Nov 7 01:46:51 CST 2005


> Is there actually a way to import (rather than just specify via a
> load of @media rules) a media-specific stylesheet from within another
> stylesheet?  I'm aware that it can obviously done via the <head> of
> an HTML document, but that's not what I'm after.

How about trying things the other way around?
I meain including only two imports in head:

@import url("print.css");
@import url("master.css")

and then

in print.css usin media declarations

Print.css
-------------
@media print{
    ... print related rules here...
}
---------------

and in master.css using apropriate media declarations as well.

Master.css
---------------
@media all{
   ...general rules here...
}

@media screen{
    ...screen related rules here...
}
---------------

That basically changes the nesting order of things.

Does it make sense?

Cheers,
--
Volkan Ozcelik
+>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/
+> My projects/studies/trials/errors : http://www.sarmal.com/



More information about the thelist mailing list