W3C home > Mailing lists > Public > www-style@w3.org > December 2009

Re: Feature queries

From: Pascal Germroth <pascal@germroth.name>
Date: Wed, 09 Dec 2009 21:48:58 +0100
Message-ID: <4B200D3A.1090709@germroth.name>
To: Zack Weinberg <zweinberg@mozilla.com>
CC: W3C Emailing list for WWW Style <www-style@w3.org>
Hello,

> This needs 'else' and 'else if' constructs.  How about
> 
> @if supports( ... ) {
>    ruleset
> }
> @elif supports( ... ) {
>    ruleset
> }
> @else {
>    ruleset
> }

If media-query like operators were allowed, we need no @else:
  @if supports( display: run-in; ) { ... }
  @if supports( not(display: run-in); ) {...}

I think few people would use @else anyway, but instead use cascading:
  div {...} /* default case */
  @if supports( foo: bar; ) { div {...} /* special case*/ }



-- 
pascal
Received on Wednesday, 9 December 2009 20:49:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:47:12 GMT