CSS Sandwich of Doom

Tuesday, August 26, 2008 @ 2110

OK, I don't know why I just thought of this - it was one of those things that just "popped in there".

A while back when we were newbs (not "noobs/n00bs" and definitely not "nubs") we needed some method for including CSS fixes for the way the less-standards-compliant browsers <cough>Internet Explorer<cough> rendered CSS differently than Mozilla Firefox.

Anyway, we had hack-CSS in hack <link> elements, we had hack-CSS in in-style-sheet hack declarations, and we had hack-CSS in regular style sheets. We had something like 7 stylesheets all linked together with hacks known as the CSS S.A.N.D.W.I.C.H. (you can find it with a Google search).

What we came to find out recently was that using all the CSS hacks the CSS Sandwich required actually caused Firefox to render pages incorrectly, even though all the hack declarations were something that had been discovered to explicitly not affect Firefox… affected Firefox.

We later used server-side code to check the browser user-agent and deliver the specific style sheets needed to correct skewed browser problems. More recently, one of our guys has become an absolute CSS/HTML ninja and has managed to make several XHTML 1.0 Strict (if that means anything) sites that validate not only XHTML and CSS, but also WAI-something and Section 508 Schedule 1 (I think); And he's done it with one primary style sheet and one style sheet to unhump Internet Explorer 6.0 and lower.

Anyway the point of this post was to let the Intarwebs know that the multiple filtering hacks the CSS Sandwich contains can actually mess with the correct rendering of CSS/HTML as a whole. So by using the CSS Sandwich CSS filtering hacks, you're actually introducing problems into your rendering that would otherwise not be there; problems you'll then need to correct. It kinda turns into a diminishing vicious circle - it'll eventually look good in all browsers, but the amount of time needed to get everything to look just right'll cost you.

Just an F.Y.I., y'dig?

-Some Rando

Back to the main roll

Comments about "CSS Sandwich of Doom":


There are no comments for this post.
Name
Comments*
 
© 2006 - 2010 by Rando Jones