Hi Tom,
Sorry, I should have provided examples in my last email.
1. Below is a normal CSS rule (like the first rule in the
456bereastreet article) - which does not need a media type to be
defined:
body { background: #fff; }
2. Below is an @media rule, which DOES need a media defined (note that
an @media rule contains normal CSS rules - which are placed within
brackets):
@media screen
{
body { background: red; }
}
3. You can add as many normal rules as you want into an @media rule as
per below:
@media screen
{
body { background: red; }
p { background: yellow; }
h1 { background: lime; }
}
4. You can define an @media rule with a single media type or more than
one media type (separated by a comma) as per the two examples below:
@media screen
{
body { background: red; }
}
@media screen, print
{
body { background: red; }
}
5. You CANNOT specify an @media rule WITHOUT a media type as per the
example below. In most browsers, the @media rule above would be
(correctly) ignored as it is incomplete. In IE and Firefox, the rule
is not ignored, it is INCORRECTLY applied:
@media
{
body { background: red; }
}
Does this help?
Russ
On 24/02/2010, at 2:14 AM, Tom Livingston wrote:
So then in this article:
http://www.456bereastreet.com/archive/201002/css_efficiency_tip_use_a_single_stylesheet_file_for_multiple_media/
In his code sample in the middle of the article, the first body rule
would be ignored - or, according to the spec, SHOULD be ignored -
because there is no media type specified for it?
Just trying to follow you here...
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************