Re: [csswg-drafts] [selectors] :focus-visible and Shadow DOM (#5893)

<div id="host" style="width: 200px; height: 100px; padding: 1em; outline: none;"></div>
<script>
  const shadowRoot = host.attachShadow({ mode: 'open', delegatesFocus: true });
  shadowRoot.innerHTML = `
    <style>
      :host(:focus-visible) {
        outline: none; /* Prevent duplicate outline on the host */
      }
      input:focus-visible {
        outline: 2px solid blue; /* Visible focus outline for input */
      }
    </style>
    <input autofocus value="Focus me">
  `;
</script>


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


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

Received on Sunday, 22 December 2024 23:56:03 UTC