Re: [csswg-drafts] [selectors] `/idref()/` combinator to follow element references for arbitrary IDREF attributes (#10970)

> Wouldn’t something like `label::ref(for)` be more compatible and simple?

The fact that we have contorted pseudo-elements to facilitate encapsulation in some shadow DOM use cases doesn't mean they are an appropriate replacement for combinators. We should avoid pseudo-elements for targeting entire elements in the light DOM. That’s _precisely_ what combinators are for.

(and IMO we should even ditch pseudo-elements for the shadow DOM use cases, see #7922 and #10939) 

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 30 September 2024 17:16:47 UTC