Re: [csswg-drafts] [css-selectors-4] browser focus styles and focus-visible, example 38 (#4278)

I think that while the default stylesheet on the UAs are using `:focus` and not `:focus-visible`, the way to go is to use this `:focus:not(:focus-visible)` and disable the focus ring in that case.

For example you have a `<div tabindex="1">Click me!</div>`, when you click it, it gets focused, so it's going to match `:focus`, but it's not going to match `focus-visible`.
Chromium is still using `:focus` in the UA stylesheet, so unless you do something like that, you won't be able to get rid of the focus ring in those cases. I haven't checked what Firefox does.

CC @alice @emilio @robdodson 

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


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

Received on Wednesday, 23 December 2020 14:53:42 UTC