Re: Proposal: version at-rule

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
http://hiveminds.info/
http://soopahman.com/

Received on Thursday, 25 March 2004 18:33:01 UTC