Re: [csswg-drafts] [css-overflow-5] :focus and :focus-within styles with focused scroller pseudo-element (#11361)

I agree with this, and think the "inconsistency" is just fine. Despite some similarities, pseudo-element trees aren't shadow DOMs or iframes; they more closely resemble ordinary light-dom subtrees in the relevant aspects here.

(iframes are independent documents, and so can each have a focused element; reflecting their focus into the parent would imply the parent document can have multiple focused elements, violating an invariant we currently hold to. Shadow trees don't expose their existence at all in many ways, and the outside world instead sees *only* the host element; the host thus can't be :focus-within without exposing the existence of a shadow tree that holds the :focus.)

So, the focused pseudo-element should match :focus, and when a scroll-marker is focused, the scroll-marker-group should match :focus-within.

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


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

Received on Wednesday, 22 January 2025 00:57:38 UTC