[thelist] Inline vs. files for conditional IE CSS?

Jeffrey Barke jeffrey.barke at themechanism.com
Tue Aug 5 22:02:51 CDT 2008


> I'm on a small quest to reduce the number of css files loaded on a
> site by removing @import from css files and instead concatenating the
> css files by media type and then using YUI compressor to serve them as
> single files as much as possible.

Instead of doing multiple HTTP requests, inlining the IE-only CSS or  
using various hacks, there's another option which my friend calls IE  
root. You can create a conditional comment in the HTML and append a  
<div> with an id of "ie6" (etc) and use that as a parent selector to  
override various styles. You can read more about it on his blog:

> BTW -- any reason to use @import above instead of <link>?

I can't think of a single reason to use @import of <link>. According  
to Steve Souders in High Performance Web Sites, there are performance  
benefits to using <link> instead of @import. The @import rule can  
cause the blank white screen phenomenon.


Jeffrey Barke
Senior developer / information architect

More information about the thelist mailing list