Skip to content

Commit

Permalink
Fix custom-forms heights and position (#25602)
Browse files Browse the repository at this point in the history
Now `.custom-control` will have height equal to `$font-size-base`
Fix custom checkbox and radio top position (we can't subtract rem from unit)
`$line-height-base - $custom-control-indicator-size` is not valid
Because `$line-height-base` is a unitless variable and `$custom-control-indicator-size`
is a unit (rem) variable
  • Loading branch information
iamandrewluca authored and mdo committed Jul 15, 2018
1 parent 2d8422f commit 0fd4083
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scss/_custom-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.custom-control {
position: relative;
display: block;
min-height: (1rem * $line-height-base);
min-height: ($font-size-base * $line-height-base);
padding-left: $custom-control-gutter;
}

Expand Down Expand Up @@ -63,7 +63,7 @@
// Background-color and (when enabled) gradient
&::before {
position: absolute;
top: (($line-height-base - $custom-control-indicator-size) / 2);
top: (($font-size-base * $line-height-base - $custom-control-indicator-size) / 2);
left: -$custom-control-gutter;
display: block;
width: $custom-control-indicator-size;
Expand All @@ -78,7 +78,7 @@
// Foreground (icon)
&::after {
position: absolute;
top: (($line-height-base - $custom-control-indicator-size) / 2);
top: (($font-size-base * $line-height-base - $custom-control-indicator-size) / 2);
left: -$custom-control-gutter;
display: block;
width: $custom-control-indicator-size;
Expand Down

0 comments on commit 0fd4083

Please sign in to comment.