- From: François REMY <francois.remy.dev@outlook.com>
- Date: Thu, 13 Jun 2013 22:57:43 +0200
- To: "Brian Kardell" <bkardell@gmail.com>, "Timmy Willison" <timmywillisn@gmail.com>
- Cc: "Lea Verou" <lea@w3.org>, "www-style list" <www-style@w3.org>, <adrian@featurist.co.uk>
> In numerous past discussions (sorry I cant scoop together links right > now) it had been decided that the above would be an error. In fact, > IIRC it was one of the reasons for not using :has() which has been in > jquery for... well... forever and was one of the original proposals > from like 1999 or something. There's absolutely no valid performance reason to do this. Since "a! + b! c" is just sugar for "a! + b c, a + b! c" it doesn't introduce any perf issue that the former doesn't already. This is different from :has(...) which can have perf issues because you can use it to "return back down the DOM tree". In the case of "a:has(b):has(c)", you cannot simply apply a selector to an element to find out it has a parent which match a selector, because the second 'has' can reference an element that still hasn't been added to the DOM tree due to progressive rendering interruption. Therefore, you've to introduce a notion of state for :has(...) while the subject selector can be implemented stateless.
Received on Thursday, 13 June 2013 20:58:06 UTC