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-control-sm and .custom-select-sm give different font size/padding #26476

Closed
alecpl opened this issue May 10, 2018 · 8 comments
Closed

.form-control-sm and .custom-select-sm give different font size/padding #26476

alecpl opened this issue May 10, 2018 · 8 comments

Comments

@alecpl
Copy link
Contributor

alecpl commented May 10, 2018

I expect these two to give the same font-size and left-padding:

<select class="form-control form-control-sm">
  <option>Small select</option>
</select>
<select class="custom-select custom-select-sm">
  <option>Small select</option>
</select>

https://jsfiddle.net/6oj656wb/

@alecpl
Copy link
Contributor Author

alecpl commented May 10, 2018

And in *-lg variant left padding is different https://jsfiddle.net/6oj656wb/1/

@alecpl
Copy link
Contributor Author

alecpl commented May 10, 2018

And BTW, left padding is inconsistent with inputs https://jsfiddle.net/6oj656wb/2/

@mdo
Copy link
Member

mdo commented May 10, 2018

Nearly everything between our custom components is different, why would there be an expectation to keep these the same values? I'm inclined to leave them as-is.

@alecpl
Copy link
Contributor Author

alecpl commented May 10, 2018

Because if I use input.form-control-sm together with select.custom-select-sm in my forms they do not look consistent. And I want to use custom selects instead of just form-controls because it looks just nicer.

@Johann-S
Copy link
Member

Just a quick note maybe @alecpl you should upgrade to our latest release 4.1.1: https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css

@alecpl
Copy link
Contributor Author

alecpl commented May 10, 2018

Updated, no visible difference. https://jsfiddle.net/6oj656wb/3/

@RobertSmits
Copy link
Contributor

RobertSmits commented May 23, 2018

I can confirm this issue, and that it has been around since the beta.
The padding of the custom-select and -sm and -lg variants is different from the form-control and variants padding.

So is the font size: form-control-sm has font-size: .875rem and custom-select-sm has font-size: 75%

And in a form this font size difference is very noticeable.

image

@MedShake
Copy link

MedShake commented Jun 8, 2018

Fix it temporary with :

<select class="custom-select form-control form-control-sm">
  <option>Small select</option>
</select>

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

5 participants