Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:focus-visible not respecting the outline-color #270

Open
Skil3e opened this issue Aug 24, 2022 · 5 comments
Open

:focus-visible not respecting the outline-color #270

Skil3e opened this issue Aug 24, 2022 · 5 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@Skil3e
Copy link

Skil3e commented Aug 24, 2022

Not sure if it is intentional but outline-color does not work alone.

A fix i found is to add outline-style : solid; on the theme.css file so it respects the rule.

/* :file src/extra/theme.css */
:focus-visible {
  outline-style : solid;
  outline-color : var(--link);
}
@argyleink
Copy link
Owner

oh!? which browser did it not work with?
solution seems reasonable but i'd love to understand the problem scenario a bit better first.
thanks for reporting

@Skil3e
Copy link
Author

Skil3e commented Aug 25, 2022

I tried both Chrome and Firefox on windows 10. Both seemed to use their own color until you set the outline-style

@argyleink
Copy link
Owner

I see! confirmed on MacOS as well that Firefox and Safari don't change the outline color unless outline-style is provided.

big bummer tho:
when you change the outline-style, the automatic border-radius matching goes away and we're back to square cornered outlines.. it appears there's a cross browser interop issue with this feature. i'm going to get this on our interop teams radar and see if we can resolve it in Safari and Firefox.

@argyleink argyleink added bug Something isn't working wontfix This will not be worked on labels Aug 25, 2022
@argyleink
Copy link
Owner

Oh, and I see you're saying Chrome on Windows also fails at this, which it works as expected in Chrome on MacOS. Definitely a browser interop issue imo. Will report back here as I learn more.

@WebMechanic
Copy link
Contributor

when you change the outline-style, the automatic border-radius matching goes away

image

This is Firefox and Chrome (Win) outline-style: dashed, the inner gray line is the border.

Safari has/had issue with outline + border radius so we "fake" them there with multiple box-shadow (solid lines only though). We need to support mobile SF13 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants