W3C home > Mailing lists > Public > www-style@w3.org > May 2014

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 22 May 2014 20:50:25 -0400
Message-ID: <537E9B51.3050200@mit.edu>
To: www-style@w3.org
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:27 UTC