W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2018

Re: [csswg-drafts] [css-selectors] `:has()` and performance (#3345)

From: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
Date: Mon, 26 Nov 2018 09:09:09 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-441566869-1543223348-sysbot+gh@w3.org>
> would be essentially identical in terms of performance, and therefore viable for the live profile.

That is not true. `b.matches('a b:has(c)')` requires looking at every descendant of `b`, while `c.matches('a b c')` does not. Evaluating the selector is much more expensive.

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3345#issuecomment-441566869 using your GitHub account
Received on Monday, 26 November 2018 09:09:14 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:39 UTC