-
Notifications
You must be signed in to change notification settings - Fork 76
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
Browser default focus style overrides #61
Comments
I see what you mean. The problem is that we need a default that works everywhere, both dark and light backgrounds. So Still, the blue outline color is only hardcoded in Chrome/webkit/blink. Other browsers get the I could remove the webkit-specific handling, but that would make the switch focus different from the "standard" webkit focus ring. The best approach would probably be to have the outline in an |
Ah, I see it now. Interestingly, in Edge, my default focus ring on that page is orange when I remove the keyword, so I can see it on the blue background. The Either way, relying on system colors or browser defaults is still going to conflict with some page styles, just as my approach will conflict with darker backgrounds. I think an invert might be better than hoping the system color does not conflict with the page background. So. Yeah. What can I do? |
To get an inverted-color border we could look at something with If you can look into it, I'd be happy to take a look and integrate it. |
The default focus styles from the browser are generally awful. In the demo, the blue background of the page has a contrast ratio of 1.02:1 to Chrome's default focus ring. Some consider this a WCAG violation, some don't (because it is a browser default). Either way, overriding the browser's default focus styles for something with sufficient contrast and visual appeal is, I think, worth including here.
Since I am not familiar with the project, nor SCSS, I mocked up some styles in regular CSS. I do not know all the color combinations nor customizations that are possible, so I did not initiate a pull request. I am happy to offer more insight if helpful.
The proposed styles:
The text was updated successfully, but these errors were encountered: