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

Re: [csswg-drafts] [css-shadow-parts-1] Can class name selectors apply to a part? (#3431)

From: Ryosuke Niwa via GitHub <sysbot+gh@w3.org>
Date: Sun, 15 Nov 2020 09:27:41 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-727540726-1605432460-sysbot+gh@w3.org>
> JS set `:state()` is certainly useful, but there needs to be some sort of way to do what @AmeliaBR suggested, otherwise we may see authors re-implementing native pseudo-classes with JS, which is undesirable.
> @rniwa what if these "forwarded" selectors cannot include `:state()`? And what if they're only compound selectors? Wouldn't those two things make it easier to implement?

I don't see how. The fundamental problem is states like `:hover` implicitly affecting random other elements. That would quickly lead to O(n^2) behavior given the inherited value, etc...

-- 
GitHub Notification of comment by rniwa
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3431#issuecomment-727540726 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 15 November 2020 09:27:43 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC