Re: Targeting CSS3 only (evil?), either with pseudoclass or an extra syntax for properties.

Barry wrote:
> Lachlan, browser sniffing is good,

No it isn't [1].

> and so is innovation in CSS development--even when it's outside of this
> mailing list.

Sometimes, yes.  That's one reason for having vendor prefixes, to allow 
them to innovate without impacting on any future standardisation of the 
idea.

> I don't use conditional comments in order to use non-standard CSS 
> anyway. I use them when I can't get various versions of IE to render the 
> way other browsers do

There is absolutely no reason to use a conditional comment in order to 
give IE-only CSS.  There are plenty of CSS filters available, and the * 
html hack will give you all you need.

* html div { margin: 20%; }

That will *only* work in IE, thus there is no need for a <!--[if 
IE]>conditional comment<[endif]-->

Centricle has a list of all known CSS filters [2] available and some of 
the browser versions for which they work.

> I would like to see conditional comments standardized.

And when all browsers are forced to implement all of these:

   <!--[if IE]>...<[endif]-->
   <!--[if Moz]>...<[endif]-->
   <!--[if Lynx]>...<[endif]-->
   <!--[if Opera]>...<[endif]-->
   <!--[if Safari]>...<[endif]-->
   <!--[if OmniWeb]>...<[endif]-->
   <!--[if Whatever]>...<[endif]-->

... ignoring the actual UA specified simply because authors abuse them 
too much, and develop sites for only one browser, we'll be back where we 
started and you'll be asking for the next method Microsoft implements to 
be standardised.

BTW, which of those, if any, would you actually take the time to use? 
Would you seriously fill your markup with bloat to handle a few minor 
rendering issues in each of those browsers, if not more, or simply test 
with IE and maybe Mozilla and stick "best viewed with X" [3] on your site?

If you don't believe that will happen, look where current based-browser 
sniffing has got us with user agents intentionally lying in their user 
agent string!

Heck, even server side browser sniffing is still causing trouble, which 
has recently forced the validator to change it's user agent string [4]. 
  Many users that don't use IE are still locked out of many sites, 
regardless of the fact that the site works just fine in non-IE browsers 
by changing the UA string, /all thanks to *browser sniffing*/.  So 
please, trust us when we tell you browser sniffing is simply not 
acceptable under any circumstances.

There are other reasons besides browser sniffing that conditional 
comments won't be implemented either, in fact they've already been 
requested for Mozilla at least twice [5|6], and marked WONTFIX.

[1] 
http://lachy.id.au/blogs/nettwits/2004/05/does-my-browser-really-smell-that
[2] http://centricle.com/ref/css/filters/
[3] http://www.anybrowser.org/campaign/
[4] http://www.w3.org/Bugs/Public/show_bug.cgi?id=1069
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=124751
[6] https://bugzilla.mozilla.org/show_bug.cgi?id=217581

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox

Received on Wednesday, 6 April 2005 15:20:18 UTC