Thursday, August 4, 2005, 1:40:16 PM, Eric A. Meyer wrote:
>     Another good discussion would be on hack management-- what are
> some good ways to organize style sheets so that hacks are easy to 
> maintain?  A good starting point might be for people who have 

As one who shudders at the thought of maintaining separate CSS hack files
(I like to keep rules about an element in one place) I'm imagining a simple
system to deal with the IE*/win phenomenon:

1) use conditional comments to feed all IE/win a single CSS file, let's
call it dealwithie.css

2) dealwithie.css would contain one ruleset affecting BODY with a
proprietary behavior that added to the BODY element a className (or short
list of classNames) to assist in targeting the version of IE in use.
IE6 would cause something like:
document.body.className = document.body.className + " isIE6 isLtIE7";

3) In your CSS:

.isLtIE7 #needsLayout {height:1%}

Notes:

* Supposedly behaviors persist even when JS is disabled.  Still true?  How
reliable is it?  Worst case is it fails, hacks aren't applied.
* I've never worked with behaviors, but the code I propose shouldn't be
rocket science.  I assume this would have to deal with the
waiting-for-the-DOM-to-be-initialized problem though.
* Removing hacks past their necessity would be trivial.  Search for
selectors with "isIE50" or whatever, and remove rulesets.

* This boils down to browser sniffing and sticking the result where you can
get to it with CSS.  It's not a great solution...Other ideas?  Too
off-topic for css-d?

Steve
-- 
http://mrclay.org/ : http://frenchhorns.mrclay.org/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to