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

[Input] Dropdown and input heights do not match in a form #4279

Closed
cbxp opened this issue Jul 13, 2016 · 4 comments
Closed

[Input] Dropdown and input heights do not match in a form #4279

cbxp opened this issue Jul 13, 2016 · 4 comments
Milestone

Comments

@cbxp
Copy link

cbxp commented Jul 13, 2016

See example in http://semantic-ui.com/collections/form.html#form, Billing Information: CVC and Expiration fields are next to each other and Expiration is ~1px higher.

We think this bug came with version 2.2

@jlukic jlukic added this to the 2.2.3 milestone Jul 29, 2016
@jlukic
Copy link
Member

jlukic commented Jul 29, 2016

It appears to be 1px off as stated

@jlukic jlukic modified the milestones: 2.2.3, 2.2.4 Aug 22, 2016
@jlukic jlukic modified the milestones: 2.2.5, 2.2.6, 2.2.7 Oct 28, 2016
@jlukic jlukic changed the title Dropdown and input heights do not match in a form [Input] Dropdown and input heights do not match in a form Feb 20, 2017
@jlukic
Copy link
Member

jlukic commented Feb 20, 2017

After spending 30 minutes puttering around on this and changing tons of rules, I found the final solve to be extremely simple.

The global @inputLineHeight setting in the default them does not have enough decimals represented to round exactly. I've changed it to to its fractional representation (17/14)

@amscher
Copy link

amscher commented Mar 15, 2018

I'm pretty sure this is still a problem, or at least I'm still dealing with it. See updated fiddle here, using CDN for css: http://jsfiddle.net/rxjfnkwj/

I believe the problem has to do with the fact that dropdowns and buttons have text inside them which establish the line height. The height then responds to the line height + padding. Whereas for the input, there is just the placeholder text, and the total height doesn't change as you increase the padding or the line height... at least when I inspect the element and adjust the line height, nothing changes, but the total height DOES change when I adjust the padding.

So, I went about trying to change both @inputPadding in site.variables and @padding in input.variables, but I can't seem to get those changes to affect the final input padding...

@amscher
Copy link

amscher commented Mar 15, 2018

I was able to adjust the padding for form inputs in form.variables by doing...
@inputPadding: (@inputVerticalPadding + (1em / 2)) @inputHorizontalPadding;

That seemed to fix the issue for inputs that were contained inside forms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants