Re: feature queries

On 13/04/11 19:59, L. David Baron wrote:
> @supports ( display: flex ) {
>    ...
> }
>
Could there be a shorthand syntax for vendor extensions, or would we end 
up with a lot of constructs like this?

@supports ( display: flex ) or
           ( display: -moz-flex ) or
           ( display: -webkit-flex ) or
           ( display: -o-flex ) or
           ( display: -ms-flex ) {
   ...
}

Which will get even more fun if you want to check two or more properties 
are supported (ignoring the particulars of the properties here):

@supports ( display: flex and column-count) or
           ( display: flex and -moz-column-count) or
           ( display: -moz-flex  and column-count) or
           ( display: -moz-flex  and -moz-column-count) or ...

And I've already lost the will to carry on.

At least if you could specify the general case and a few exceptions it 
would be a lot more straightforward eg.:

@supports ( display: *-flex and *-column-count) and
           not ( -webkit-flex or -ms-column-count) {
  ...
}

Rob

Received on Thursday, 28 April 2011 23:55:28 UTC