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

[v4 css] form-control-sm styling #21587

Closed
Mottie opened this issue Jan 7, 2017 · 4 comments
Closed

[v4 css] form-control-sm styling #21587

Mottie opened this issue Jan 7, 2017 · 4 comments

Comments

@Mottie
Copy link

Mottie commented Jan 7, 2017

When comparing form elements with a "form-control" versus a "form-control-sm" class in Bootstrap v4.0.0-alpha.6, there are some notable differences – I'm using Windows 10 and Chrome version 55.0.2883.87 m (64-bit), in case that matters.

demo (updated!)

2017-01-06 19_38_24-bootstrap v4 0 0-alpha 6 issue

  • select.form-control-sm – border too dark
  • input.form-control-sm– mismatched height & inset border

Update: sorry, I didn't realize that both classes needed to be applied.... the input height is still slightly off.

@sergiopantoja
Copy link
Contributor

Same on macOS Sierra and Chrome version 55.0.2883.95 (64-bit).

image

@sergiopantoja
Copy link
Contributor

@Mottie

So it looks like .form-control-sm needs to be used with .form-control. For example:

<input class="form-control form-control-sm" type="text">
<select class="form-control form-control-sm">
  <option>Small select</option>
</select>

Can you try this and see if you still encounter the same issue?

@Mottie
Copy link
Author

Mottie commented Jan 7, 2017

Ahh, you're right!... but the input height is still not matching perfectly... here is a zoomed in screenshot:

2017-01-06 19_38_24-bootstrap v4 0 0-alpha 6 issue

sergiopantoja added a commit to sergiopantoja/bootstrap that referenced this issue Jan 7, 2017
…tn-sm

This commit shares line-height across these form elements, and adds the same height calculation to `select.form-control-sm` that we have for `select.form-control`.

For issue twbs#21587

Relevant commits:

twbs@8e455ff
twbs@0c467e7
twbs@6993db1
@mdo mdo modified the milestone: v4.0.0-beta Jan 25, 2017
mdo added a commit that referenced this issue Mar 28, 2017
— Updates $btn- and $input- variables for padding and line-height to be
shared like the $input-btn-border-width variable.

— Moves from 1.333 lg line-height to 1.5 for better and easier math
that matches the small inputs and buttons.

— Updates button-size mixin to accept a line-height argument

Also closes #21592
@mdo mdo added the has-pr label Mar 28, 2017
@mdo
Copy link
Member

mdo commented Mar 28, 2017

Fixed by #22287.

@mdo mdo closed this as completed Mar 28, 2017
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

4 participants