-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Reset letter spacing for form elements #13150
Conversation
Some browsers, such as Chrome, set `letter-spacing: normal` for form elements. For consistency with the other styles, it should be set to `inherit` by Preflight.
Hey! Can you share a real example of where this would have been helpful? I believe it exists but always helpful to see the practical motivation 👍 |
Sure. Sorry for the delay. Here is an example: https://stackblitz.com/edit/sveltejs-kit-template-default-fwqbwb?file=tailwind.config.js Notice how |
Thanks! What I mean though is can you share a real design you needed to build where this was important and you ran into unexpected results without this change? |
Ah. For example in a simple to-do application, where you enter a new task in an It is of course not a big issue - it will usually be a small difference in appearance, and it can be fixed by applying the relevant |
Thanks! |
Some browsers, such as Chrome, set
letter-spacing: normal
for form elements. For consistency with the other styles, it should be set toinherit
by Preflight.Currently, for
<div class="text-sm"><textarea>hello</textarea></div>
, the<textarea>
will inherit thefont-size
andline-height
, but notletter-spacing
. This PR fixes that.