Hi

Conditional statements in HTML such as those used by IE/Windows are a slippery slope and they seriously break a central tenet of programming. They are contained with <!-- HTML comments --> and comments in code are not meant to be parsed as code. It's just plain badness. What happens if someone adds a comment that happens to be parsed by some piece of software? the software then goes on and does some unexpected things.

Comments, of course,  can be machine readable such as those used to provide code documentation or CVS/SVN keywords, but these don't actually run anything or fork the code base.

This is a 2005 version of mid 90's browser sniffing - forking the codebase to provide slighlty different  content based on the client  in use. Better to get the browsers actually rendering things to the published spec (hard, yes, but a better outcome).

James


On 9/30/05, Thierry Koblentz <[EMAIL PROTECTED]> wrote:
Drake, Ted C.  wrote:
> I think the future of CSS is not in hacks but looking seriously into
> using the conditional comments. I'm saying this as someone that is
> trying to figure out the best approach for retrofitting older
> conversions.

I rely heavily on Conditional Comments.
IMO, the easiest way to deal with browser bugs is to feed them not with
specific rules, but with specific styles sheets.

This is how I build/split my sheets:
- I use @import and design for Firefox
- I use MS Conditional Comments to include fixes for the different IE/Win
versions (above v4).
- I use @import "cssFile.css" to take care of IE5 Mac.
- If I decide to support NN4, then I use JS to write a link to a styles
sheet (CSS doesn't work without JS in NN4)

For me the main advantage of these branching techniques is that I do not
take the risk of breaking one browser while trying to fix another. Also,
because it eliminates the need for CSS hacks, my sheets are free of cryptic
rules.

Thierry | www.TJKDesign.com

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************


Reply via email to