-
Notifications
You must be signed in to change notification settings - Fork 139
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
Added outline:none for input field #87
base: master
Are you sure you want to change the base?
Conversation
Outlines on the input look bad and don't go with the themes (amazing themes btw) I'll add pictures for comparison in a comment.
While this may not affect tab navigation, this does affect accessibility for those who have a visual impairment. A better solution (IMHO) is to fade the outline after a period of time, so as to still indicate focus. Maybe something like: @keyframes fade-outline {
to { outline-color: rgba(0,0,0,0); }
}
#input-field:focus {
animation: fade-outline 0.375s linear 2s both;
outline-style: solid;
} |
I never thought of that, it solves both problems I worried about. I don't think it would be too much work to sync the outline colour to a colour included in the theme and fade it. That would look good too, but i'm not sure how it would work for accessibility. I've never coded for accessibility because most of my projects are for my own use. If you think that it doesn't work, then the blue fade is probably fine too. |
You could customize the outline color, but seeing that the themes are disorganized CSS stylesheets, that would require either:
These aren't impossible hurdles by any means, but I just opted to let the user agent stylesheet define the color for One solution that would require only modification of CSS stylesheets without messing with the JavaScript implementation of theme selections would be to refactor the themes to use custom CSS properties that are semantically named. This can be seen in action in the implementation of themes for my portfolio, where each color of the theme is attached to a named custom CSS property ( #input-field:focus {
animation: fade-outline 0.375s linear 2s both;
outline-color: var(--foo-bar);
outline-style: solid;
} Approaching the problem from a JavaScript perspective, you could set the That said, by far the simplest solution is to let the browser define the |
Outlines on the input look bad and don't go with the themes (amazing themes btw)
I'll add pictures for comparison in a comment.
Edit: This does not affect tab navigation for accessibility