Re: [csswg-drafts] Do we need :focus-visible-within ? (#3080)

@Westbrook Now I'm confused. That comment doesn't mention `:focus-within` at all, what am I missing? My point is that `:focus-visible` does work on the flattened tree (across slots and also crossing the shadow boundary):

```html
<!doctype html>
<div id=host>
  <template shadowrootmode="open">
    <style>div:focus-within { background: green }</style>
    <div id=inner>
      <slot></slot>
    </div>
  </template>
  <input autofocus>
</div>
```

All of the `slot`, `#inner` and `#host` will match `:focus-within`.

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


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

Received on Friday, 3 April 2026 20:16:58 UTC