Previous Message
Next Message

[css-d] Re: @media rules

Sent by The Moose on 13 January 2003 05:05


Hello Rijk,

Thank you for the information! By trial and error I found that it's most dreamweaver-friendly (with
respect to design view) when the @screen code is written at the bottom of the stylesheet, and not at
the beginning, AS IF all rules were treated sequentially, all at once, with last items having more
specificity than the preceding items.

Your answer triggered another question though. If I can use screen rules outside of the  @media
screen {}  block too, then it shouldn't really matter what is and what isn't inside the @media
block, should it? Say, should these two screen-only stylesheets:

=====================
@media screen { something }
something-else
=====================
and
=====================
something
something-else
=====================

be equivalent?

In other words, is it true that the @media screen block has any meaning if and only if there exists
another @media block with different media type specified?

--Wojtek





| Date: Sat, 11 Jan 2003 00:28:39 +0100
| From: Rijk van Geijtenbeek [EMAIL-REMOVED]>
| To: [EMAIL-REMOVED]
| Subject: Re: [css-d] @media rules order

| > Assuming the actual code within these two CSS files is identical, should
| > these CSS files be treated identically by browsers irrespective of the
| > order of @media rules?
|
| Yes. The styles for screen should not be applied when printing, and vice
| versa. So it really doesn't matter. If you've also got styles with the same
| selectors outside the @media blocks, these will be applied. The results
| then depend on their order in the style sheet relative to the block.
|
| > A side note: I noticed that DWMX mixes from different @media rules
| > depending on the order they appear in a CSS file, which is why I started
| > to investigate a more general question of the order's importance...
|
| Maybe DreamweaverMX isn't really @media aware?
Previous Message
Next Message

Message thread: