-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
outline-offset for input[type="search"] in WebKit #19
Comments
I would go with option 1, especially since I didn't notice any outlines for submit button types, so I'm not sure what you are referring to (testing in Safari 5 in Windows). I also don't think that custom focus outlines should be a consideration since any oddities can be fixed as part of the custom style. |
The problem applies not only to custom outlines on Setting |
Option 1, the cost is lower. |
Useful. thx |
Not going to try and juggle the issues here. Better to leave a tiny visual difference in Safari/Chrome and let library code handle any customizations that might be wanted. |
By default WebKit sets a negative default
outline-offset
on certain form elements:And resets it to
0
for specificinput
types:normalize.css sets
input[type="search"]
to have the appearance of atextfield
so that styles can be properly controlled. However, theoutline-offset
is different to that for a defaultinput
.The options are:
input[type="search"]
to useoutline-offset: -2px
so that it matches the default textinput
. This has makes no difference if the appearance isn't set totextfield
(so it's "safe" either way). However, the outline position still varies between textinput
and all the submit button types.input, select, textarea
to useoutline-offset: 0
but have the halo focus ring not wrap quite so snuggly around textarea and text inputs.Another consideration is that if the
outline-offset
is left at-2px
for some elements, it can look a bit odd if you use a custom focus outline.The text was updated successfully, but these errors were encountered: