Thanks both.

>> A browser will load everything, as long as it supports, or pretends to
>> support, the link or @import media and queries used. It will put styles
>> to use as needed and supported.

Need a clarification: 

The way browsers treating @import isn't the same as @media correct? 

If yes, it seems it's safe to bet that when a desktop browser sees a media 
queries like  these it will ignore

<link rel="stylesheet" media="only screen and (max-width: 480px), only screen 
and (max-device-width: 480px)" />
<link rel="stylesheet" media="only screeand (orientation:portrait) " />


Or when a Mobile Browser sees this it ignores too (because I don't see a way to 
print command from any Mobile Browsers that I know of.

<link rel="stylesheet" media="print " />

In the case of @media print, I don't remember where I read it or it's simply 
just something came up from me due to my flawed understanding, that browser 
does not load print style sheet until a print request has been made.
>>  
> 
> In addition to Georg's (always) excellent advice, there are several
> ways of slimming down style sheets that might help you, Tee:
> 
> 1. Use a "set styles" instead of a "reset" to avoid duplication

Well, I am not a "if it's good for Meyer/ Zelman" it's good for me kind of web 
developer because I don't worship :-) the only reset I use is "* 
{margin:0;padding:0} ". 

> 
> 2. Minify your style sheets (can be done on the server)


> 
> 3. Gzip all text-based assets. (You do that anyway, right?)


> 
> 4. Combine those style sheets you can using server-side code.



Under the perfect condition, the #2, #3 and #4 are the solutions, but the 
reason for my question is because in most cases,  #2, #3 and #4 may not be 
available.


#2 The Minify script sometimes can break the stylesheet. In one instance, the 
WordPress Minify plugin ignores the display none in the @media print. CSSTidy 
doesn't seem to handle well either when a style sheet has browser prefixes - I 
found this out from my Coda Editor.


#3/#4
I think most shared hosting accounts do not allowed Gzip.

There is another reason I want to try as much the optimization directly in the 
template files is because part of my work is deal with people who haven't a 
clue of the above, so if I can solve part of the optimization directly in the 
template file, at the same time without incurring ridiculous and unrealistic 
expectation customer support coming from this targeted audiences it will be 
whole lot better.

<rant> One thing I'd learned from this targeted audiences, is you can never 
give/advice/tell them anything more than the little money they paid, or you are 
asking for trouble because next thing they expect from you is solve every 
little issue they run into in their sites, including "why there are so much 
white space between each paragraph". And a question like this could be threw at 
you even a year later. A polite and well-manner customer can be abusive at the 
same time if you haven't deal with one!</rant>

tee



tee

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to