W3C home > Mailing lists > Public > www-style@w3.org > March 2004

Re: Proposal: version at-rule

From: Chris Moschini <cmoschini@myrealbox.com>
Date: Thu, 25 Mar 2004 17:33:26 -0500
To: www-style@w3.org
Message-ID: <1080254006.d6bf011ccmoschini@myrealbox.com>

Unfortunately, I think what this discussion is revealing is that we need an @useragent rule, instead of @version. Every e-mail about this somehow founders on the fact that browsers just aren't honest about support, and even their honest claims come up false here and there.

But the discussion continues because this problem is very important to developers - all these inevitable "buts" take a lot of time to sort out and create very ugly hacks to work around, which in turn can cause their own problems.

So - how about being able to place a set of rules in an @useragent block, a la:

@useragent( "MSIE", 6 ) {
/* rules here */

Only browsers reporting their User Agent with both the string "MSIE" and "6" in it will use the rules in that block. It's much clearer than, say, the voice-family hack.

For the sake of future version support, a notation such as

@useragent( "Opera", 3+ )

ought to be supported. Otherwise newer browsers will ignore the @useragent on the assumption they support everything.

This sort of checking is discouraged but is sometimes essential in the Javascript world - why not learn from success?

-Chris "SoopahMan" Moschini
Received on Thursday, 25 March 2004 18:33:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:12 UTC