Boris Zbarsky wrote:
> 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.
Printing was just an example.
Question was about MQs actually.
@import url(a.css) min-device-width:800;
and a.css contains:
@media max-device-width:1200
{
p { color: red;}
}
will p get color red if your screen happens to be 640 pixel wide?
Specs (CSS 2.1 and CSS3) are not clear on the subject.
They say (http://www.w3.org/TR/css3-cascade/#at-import) you "can" skip
a.css loading.
So you may load or you may not load that conditional import. So is
ambiguity that I have.
I think that wording should be as:
"So that user agents can avoid retrieving resources for unsupported
media types, authors may specify media-dependent @import rules. These
conditional imports specify comma-separated â€œmedia queriesâ€