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

Line height on Input component is not set correctly #371

Open
morgoe opened this issue Nov 26, 2018 · 2 comments
Open

Line height on Input component is not set correctly #371

morgoe opened this issue Nov 26, 2018 · 2 comments
Labels
bug For issues that describe a defect or regression in the released software good first issue For issues that a new contributor could likely submit a pull request for without needing much help

Comments

@morgoe
Copy link

morgoe commented Nov 26, 2018

Type: minor

Describe the bug
The Input.lineHeight setting that applies to all input components is not being set on the actual <input> but rather on the wrapping div, which has no effect.

To Reproduce
Steps to reproduce the behavior:

  1. Change Input.lineHeight to something like '24px'
  2. Find a text field (any textfield)
  3. Inspect element and see that the line-height: 24px CSS is being applied to the div and not to the input element.

Expected behavior
The line-height attribute should be applied to the actual <input> element.

Screenshots
screen shot 2018-11-26 at 1 22 52 pm
screen shot 2018-11-26 at 1 22 39 pm

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Chrome
  • Version: 70

Additional context
The reason this is a problem is because with the default font Source Sans Pro, the line-height of the input gets automatically set to 20px. But when I change the font to Roboto, the line-height gets automatically set to 18px. And because this is less than the height of the icon, the input field flickers and changes height when an icon appears.

@morgoe
Copy link
Author

morgoe commented Nov 26, 2018

This looks to be happening on the TextInput component but not on the Phone Number component. Not sure about others.

@aldeed aldeed added bug For issues that describe a defect or regression in the released software good first issue For issues that a new contributor could likely submit a pull request for without needing much help labels Nov 26, 2018
@machikoyasuda machikoyasuda self-assigned this Nov 26, 2018
@machikoyasuda machikoyasuda removed their assignment Nov 5, 2019
@HarisSpahija
Copy link

This should be easy to fix, could you elaborate if any other components have the same issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a defect or regression in the released software good first issue For issues that a new contributor could likely submit a pull request for without needing much help
Projects
None yet
Development

No branches or pull requests

4 participants