W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [css3-conditional] navigator.supportsCSS rather than window.supportsCSS

From: Florian Rivoal <florianr@opera.com>
Date: Fri, 03 Aug 2012 17:12:44 +0200
To: www-style@w3.org, Fran├žois REMY <fremycompany_pub@yahoo.fr>
Message-ID: <op.wig0jiny4p7avi@localhost.localdomain>
> BTW, now that I accidentally used isValid using one argument, I wonder  
> about :
>
>     if(CSSStyleDeclaration.isValid("a: value1; b: value2;")) {
>         ...
>     }

I wouldn't go there. Javascript has everything that's needed for doing  
conjunctions and disjunctions, so this adds no new capability.

The semantics are not even obvious:

CSSStyleDeclaration.isValid("background: double-rainbow(center);  
background: radial-gradient(circle at center, red, yellow, green, blue,  
violet);")

Should this return true if there is no parsing error at all, or if it  
results into background being assigned at least one value? The fact that  
the parser can recover from errors complicate things.

All in all, I think we should stick to the simpler version, and leave it  
to javascript to build combined boolean expressions.

  - Florian
Received on Friday, 3 August 2012 15:13:15 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT