Skip to content

Commit

Permalink
Undo #21171 (which closed #20977)
Browse files Browse the repository at this point in the history
Turns out we did have the correct height calculation with our custom selects. The problem was we lacked a shared line-height with our buttons and inputs.

This restores the previous `calc` math and adds a line-height that reuses the input line-height.
  • Loading branch information
mdo committed Dec 24, 2016
1 parent 4377e29 commit 66c87cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scss/_custom-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@
display: inline-block;
max-width: 100%;
$select-border-width: ($border-width * 2);
height: calc(#{$input-height} - #{$select-border-width});
height: calc(#{$input-height} + #{$select-border-width});
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
line-height: $custom-select-line-height;
color: $custom-select-color;
vertical-align: middle;
background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
Expand Down
1 change: 1 addition & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ $custom-radio-checked-icon: str-replace(url("data:image/svg+xml;charset=utf8,%3C
$custom-select-padding-x: .75rem !default;
$custom-select-padding-y: .375rem !default;
$custom-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator
$custom-select-line-height: $input-line-height !default;
$custom-select-color: $input-color !default;
$custom-select-disabled-color: $gray-light !default;
$custom-select-bg: $white !default;
Expand Down

0 comments on commit 66c87cb

Please sign in to comment.