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

I have tried :has(:focus-visible) on the host of a web-component, but it does not seem to work - it gets ignored

here is my attempt:

```
 :host(:not([disabled]):has(:focus-visible)) {
  outline: 2px solid var(--vs-color-interactive-outline, initial);
  outline-offset: 2px;
  box-shadow: 0px 0px 0px 2px var(--vs-color-main-background);
 }

```

.some-class:has(:focus-visible) works just fine, but it seems :has does not like :host

So, I would really love to have a :focus-visible-within. Or :has to work with :host :)

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


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

Received on Thursday, 20 June 2024 09:11:18 UTC