Doing it your way would be loading both print and screen css files. Using
the style sheet media tag will only load the css that's needed i.e. ...
screen or print
 
Greg
 


  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of Henrik Madsen
Sent: Thursday, March 01, 2012 4:54 PM
To: [email protected]
Subject: Re: [WSG] Combining media stylesheets - best practice




I would say minimising http requests is 'best practice.' 

Henrik


 <http://www.igenerator.com.au/> GENERATOR


Henrik Madsen
+61 08 9387 1250
[email protected]
www.igenerator.com.au <http://www.igenerator.com.au/> 

On 02/03/2012, at 8:40 AM, Ben Zeller wrote:


Hi everyone,
On a recent project we've decided to combine our @print media styles at the
bottom of our main stylesheet. eg.
@media print { /* Print styles */}

In our global template, the stylesheet is imported with the media attribute
"screen". Using this attribute, the print styles are ignored.
<link rel="stylesheet" href="css/style.css" media="screen">

The following markup options offer a solution to the problem:

1. <link rel="stylesheet" href="css/style.css">
2. <link rel="stylesheet" href="css/style.css" media="all">

I guess the question I have is whether there are any caveats with either
method, and if there is a best practice solution?
The doc type is XHTML 1.0 Transitional if this is relevant.

Kind regards,
Ben Zeller

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************





*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
******************************************************************* 



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************

Reply via email to