- From: Boris Zbarsky <bzbarsky@mit.edu>
- Date: Tue, 02 Sep 2014 12:53:13 -0400
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- CC: Anne van Kesteren <annevk@annevk.nl>, "www-style@w3.org" <www-style@w3.org>, "www-dom@w3.org" <www-dom@w3.org>, David Håsäther <hasather@gmail.com>
On 9/2/14, 12:42 PM, Tab Atkins Jr. wrote: > For the same reason that :scope matches the element in .matches(). Ok, but why does it do that? Are there situations in which this is actually useful for something? > Anything you might want to pass to .matches(), you might want to pass > to .closest(). Sure. > #1 would allow you to write a .closest() selector which, paired with > :has(), can explicitly reference the starting element, Right. Are there equally compelling use cases for the other option? > but you can > reproduce that if necessary by adding a uniquifier to the starting > element and matching on that. That's a super-gross (and super-slow!) hack. I'd rather not force people into it unless required. -Boris
Received on Tuesday, 2 September 2014 16:53:44 UTC