mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-14 01:24:19 +02:00
Fix custom-forms
heights and position (#25602)
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
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
.custom-control {
|
.custom-control {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
min-height: (1rem * $line-height-base);
|
min-height: ($font-size-base * $line-height-base);
|
||||||
padding-left: $custom-control-gutter;
|
padding-left: $custom-control-gutter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
// Background-color and (when enabled) gradient
|
// Background-color and (when enabled) gradient
|
||||||
&::before {
|
&::before {
|
||||||
position: absolute;
|
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;
|
left: -$custom-control-gutter;
|
||||||
display: block;
|
display: block;
|
||||||
width: $custom-control-indicator-size;
|
width: $custom-control-indicator-size;
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
// Foreground (icon)
|
// Foreground (icon)
|
||||||
&::after {
|
&::after {
|
||||||
position: absolute;
|
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;
|
left: -$custom-control-gutter;
|
||||||
display: block;
|
display: block;
|
||||||
width: $custom-control-indicator-size;
|
width: $custom-control-indicator-size;
|
||||||
|
Reference in New Issue
Block a user