Michael Adams wrote: > However, my personal preference is for the @import hack: > FOR > * The CSS stays in the css files (doesn't cause you to hack the header) > * Create code for the standards compliant browsers then hack for IE > * All IE hacks are in a seperate file > * It may not need to work for IE8 and above > * comment conditional code is _ugly_ HTML > * no javascript engine required
* The "@import media hack" acts as a 2-way split, so we can both hide some styles from IE/win and show them to others and show some styles to IE/win and hide them from others - all in one @import. > AGAINST * It is a non-standard hack The "@import media hack" won't create any validity problems by itself. It relies entirely on a Trident (IE/win) parsing bug - not on non-standard CSS. > * It may not work with IE8 and above I really hope so, but it'll probably depend on which mode and/or "standard opt-in" that gets triggered in upcoming IE/win versions - for backward-compatibility reasons. > * Extra CSS file on server - 1 extra dowload (usually <1kb) With that small a file-size, the number of workarounds and corrections seems too small to bother with a separate stylesheet for IE/win - IMO. I'm often up into 5 - 8 KB file-size with corrections for IE/win on regular-sized sites, where the extra download doesn't matter even on slow connections. ----------------- I have no preference for which hacks to use - as long as we have to use hacks at all. The case determines the choice. * the hack should be "stupid enough" not to survive for long or be copied into other browsers. I want my hacks to become obsolete. - The "@import media hack" is perfect in this sense, as it can't survive an upgrade to proper standard-support in IE/win. * I rather hack in CSS than adjust the markup for weak browsers - whenever possible. Non-valid (X)HTML won't easily get through the process anyway at my end, and "valid but strange constructions" rarely pass the 'logical sequence' tests I perform. - For now the Conditional Comments are fine when markup-adjustments are really necessary, while the "@import media hack" takes care of CSS branching. ----------------- There are a few more ways we can hack browsers through @import... <http://www.gunlaug.no/contents/wd_chaos_20.html> ...but I won't recommend the non-valid ones :-) regards Georg -- http://www.gunlaug.no ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
