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

form-select specifies vertical-align: middle which causes alignment problems #32271

Closed
rmacfadyen opened this issue Nov 27, 2020 · 3 comments · Fixed by #32318
Closed

form-select specifies vertical-align: middle which causes alignment problems #32271

rmacfadyen opened this issue Nov 27, 2020 · 3 comments · Fixed by #32318

Comments

@rmacfadyen
Copy link

rmacfadyen commented Nov 27, 2020

There's a layout issue when using a SELECT and .form-select that "pushes" the SELECT "down" two pixels. This makes the alignment of INPUTs and a SELECTs incorrect.

A picture is probably better than my description

The underlying cause appears to be that .form-select has "vertical-align: middle" (v4 does not). Setting that to "vertical-align: initial" corrects the problem.

Alternatively, the problem might be with .form-control not having vertical-align: middle,

On v4 .form-select did not specify a vertical align.

OS: win10, Browser: Chrome 86, Firefox 83, Edge 87, Opera 72

Test case (v5 - fails): https://jsfiddle.net/1kc5osh4/3/

Test case (v4 - works): https://jsfiddle.net/fnau046c/

@mdo
Copy link
Member

mdo commented Nov 29, 2020

Both links you've shared show the same vertical alignment, albeit with different styling due to our custom appearance in v5. You are correct though, it does seem like we set this in v5 but no v4.

@alecpl
Copy link
Contributor

alecpl commented Nov 30, 2020

@mdo Your comment is not clear. I can confirm the issue using above v5 test case in Firefox 83 and Chromium 86. The select is a couple of pixels lower than inputs. Looks to me as a real issue.

@mdo
Copy link
Member

mdo commented Nov 30, 2020

Ah I may have only checked Safari actually. Will check out later.

@mdo mdo added the has-pr label Dec 3, 2020
mdo added a commit that referenced this issue Dec 3, 2020
Aligns the component with the .form-control. Closes #32271.
XhmikosR added a commit that referenced this issue Dec 7, 2020
Aligns the component with the .form-control. Closes #32271.

Co-authored-by: XhmikosR <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants