Re: [css3-mediaqueries] Width/Height Clarifications

Andrew Fedoniouk wrote:
> What is the difference?
> These two statements:
> @import url(a.css) print;  and
> @import url(b.css) screen;
> Are they "unsupported media types" or "media type that you might switch 
> to later" ?

The difference is simple.  If there is a circumstance under which your UA would 
apply the rules, you need to bother loading the stylesheet.  If there is not, 
you don't.

So if your UA doesn't support the "print" medium at all, no need to load a.css 
in your example.

> According to your previous message you treat them as "media type that 
> you might switch to later"

In Gecko, yes, since we do support printing.

> If you parse them both then each rule shall also contain reference to 
> media type
> (or condition expression in case of MQ)

We actually store the media type in the stylesheet, not the rules.  So in the 
screen medium, we wouldn't look at any of the rules of a.css in this example. 
In the print medium we wouldn't look at any of the rules of b.css.

(Note: last I checked there were some open questions about what should happen 
if, say, b.css has an @media block for the print medium, but maybe those have 
been resolved now.)

> Am I right in my understanding of how this is going to work?

If you want to think of it that way, you could, I guess...

> Consider following css resource:

This is the question I refer to in the note above.

-Boris

Received on Monday, 9 June 2008 21:14:34 UTC