Re: @media and browsers conditional statments

Brad Kemper wrote:

> It takes some effort to learn all the things you can do with modern CSS, 
> and learning it exposes you to best practices over and over again.
> Do you see other browsers spoofing IE's conditional comments so that 
> they could be included? Do you see authors putting conditional comments 
> around their entire CSS and hanging out a "looks best in IE" shingle? No 
> you don't. You DO see authors sometimes using CSS hacks to try to target 
> Gecko only, but you don't see smaller less-known user agents 
> intentionally replicating Gecko's few selector differences in order to 
> be able to see and render the CSS inside those rules. Authors have no 
> reason to target FireFox only for all their non-IE code, when they could 
> more easily write it to work in virtually all browsers (aside from all 
> the IE exceptions, which we typically are forced to use hacks or 
> conditional comments to deal with).
> Authors that don't know these basic truths are writing for IE-only 
> anyway, and aren't even aware of what their pages look like in FireFox 
> or anything else.

I have stayed well clear of this discussion for some time but I feel 
those little thoughts rise again with your latest message Brad.

I believe the small amount of situations that an author would need 
non-IE style rules doesn't support the need to introduce this browser 
sniffing / spoofing into CSS. The only hacks I use for Gecko, Opera or 
Safari are hacks to lock out other browsers. The only CSS bugs that I do 
see in Gecko, Opera or Safari are bugs that can not be hacked around. 
One test case.

Playing around with this demo in any browser causes strange things to 
happen (except somewhat Safari 3). One bug just with Gecko.

I do believe that we should really nut out the problems in CSS2.1 with 
the support of many test cases and work on how to implement CSS3 by the 
rules of progressive enhancement. We have arrived at this point in time 
without the need of browser sniffing and spoofing into CSS so I don't 
think that we have to go down that road now.


Nearly all men can stand adversity, but if you want to test a man's 
character, give him power - Abraham Lincoln

Received on Monday, 11 August 2008 05:29:35 UTC