- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 25 Feb 2010 17:04:20 -0600
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: www-style@w3.org
On Thu, Feb 25, 2010 at 4:58 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote: > Tab Atkins Jr. <jackalmage@gmail.com> wrote: >> I've asked for this before, under the :any() pseudoclass. It works >> just as you have it - that last rule would be written as ".add >> :any(#authors,#publications) :any(input,select,textarea)". It's >> really a necessity for many cases where you end up with a >> combinatorial explosion of selectors - this one selector replaces six >> nearly identical ones. >> >> Implementors have agreed that it's basically just syntax sugar, and >> wouldn't require any special mechanics or cause performance >> regressions. It's just not in a draft yet, is all. > > At least in Gecko's case, what you wrote above would indeed be more or less > just syntax sugar. But this: > > :any(#authors, #publications) div > > would probably be faster to match than: > > #authors div, #publications div > > In fact, we're looking into implementing this right now (as :-moz-any()) to > more efficiently deal with the numerous rules of this form that appear in > our UA stylesheet. Awesome. Selectors Level 4, here we come! ^_^ ~TJ
Received on Thursday, 25 February 2010 23:05:13 UTC