Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Master CSS file for smart hack management (See related posts)

Using various hack management techniques publicized by Doug Bowman and Molly Holzschlag, this is the default stylesheet I to in the head of my markup:

/*
        [CLIENT] screen master
*/
@import url("core.css");

/* Import WinIEx-only bugs - hide from Mac IE5 \*/
@import url("hacks.win.iex.css");
/* END hide from Mac IE5 */

/*       Import Win IE5x hacks
        ---------------------
*/

@media tty {
        i{content:"\";/*" "*/}} @import 'hacks.win.ie5.css'; /*";}
}/* */

/*       Import Mac IE5 hacks
        --------------------
*/

/*\*//*/
@import url("hacks.mac.ie5.css");
/**/


The core.css file contains my pure, "hack free" CSS. The other files referenced above contain any and all browser-specific hackery required to make IElesser browsers behave properly.

Comments on this post

danski posts on Jun 29, 2005 at 13:20
Aloha - thanks for this.

I've possibly done something wrong but I wanted to alert you that whilst using this code verbatim, Safari 2 imported the IEx styles.

If i'm a fool, apologies. If I bring bad news, apologies again :)
jbjaaz posts on Nov 18, 2005 at 14:52
I've found that in order for the IE5/Mac import hack to work, it needs to be listed before the IE5 and IE5.5 hacks.

You need to create an account or log in to post comments to this site.


Related Posts