Re: Proposal of @ua

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 UTC