W3C home > Mailing lists > Public > www-style@w3.org > November 2007

Re: Proposal of @ua

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Wed, 21 Nov 2007 21:59:26 +0000
Message-ID: <4744AA3E.60504@googlemail.com>
To: Aleksey V Lazar <lazar@mnsu.edu>
CC: "www-style@w3.org" <www-style@w3.org>

I think in the long run UA detection, whether at the level of the engine 
or the browser, would be just as brittle in the case of CSS as it has 
been for HTTP and JS. In the case of JS, best practice is to replace 
engine and browser detection with feature detection wherever possible.

CSS implementations already have code to determine whether a property 
and its value are supported or should be ignored. So rather than UA 
detection, how about considering some sort of feature detection for CSS?

@feature (font-style;) {
/* Rules for renderers supporting the font-style property. */
}

@feature (font-style: italic;) {
/* Rules for renderers supporting the italic value of the font-style 
property. */
}

This would be worthless for distinguishing between current browsers' 
feature sets, of course, but so would @ua detection.

Just a thought.

--
Benjamin Hawkes-Lewis
Received on Wednesday, 21 November 2007 21:59:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:56 GMT