Re: [CSSWG] Selectors groups (with commas) are too limited and unecessarily long to write non-combinatorially

On 5/22/14, 7:18 PM, Philippe Verdy wrote:
> would be written more simply (and completely equivalently, the above
> "selector group" being an expansion of the following "compact selector") as:
>
>     nav#external-links a(
>        [href="http://example.com"],
>        [href="https://example.com"],
>        [href^="http://example.com/"],
>        [href^="https://example.com/"]
>     ) { /*styles...*/ }

   nav#external-links a:matches(
         [href="http://example.com"],
         [href="https://example.com"],
         [href^="http://example.com/"],
         [href^="https://example.com/"]
   ) { /* styles */ }

UA support is not great yet, though Gecko has an implementation under 
the name :-moz-any instead of :matches.

-Boris

Received on Friday, 23 May 2014 00:50:55 UTC