mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(many): add correct scale to stacked labels (#28163)
This commit is contained in:
@ -104,14 +104,14 @@
|
||||
:host(.ion-focused.select-fill-outline.select-label-placement-floating) .label-text-wrapper,
|
||||
:host(.has-value.select-fill-outline.select-label-placement-floating) .label-text-wrapper,
|
||||
:host(.select-fill-outline.select-label-placement-stacked) .label-text-wrapper {
|
||||
@include transform(translateY(-32%), scale(#{$select-floating-label-scale}));
|
||||
@include transform(translateY(-32%), scale(#{$form-control-label-stacked-scale}));
|
||||
@include margin(0);
|
||||
|
||||
/**
|
||||
* Label text should not extend
|
||||
* beyond the bounds of the select.
|
||||
*/
|
||||
max-width: calc((100% - var(--padding-start) - var(--padding-end) - #{$select-md-floating-label-padding * 2}) / #{$select-floating-label-scale});
|
||||
max-width: calc((100% - var(--padding-start) - var(--padding-end) - #{$select-md-floating-label-padding * 2}) / #{$form-control-label-stacked-scale});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -190,7 +190,7 @@
|
||||
*/
|
||||
@include padding(null, #{$select-md-floating-label-padding * 2}, null, null);
|
||||
|
||||
font-size: calc(1em * #{$select-floating-label-scale});
|
||||
font-size: calc(1em * #{$form-control-label-stacked-scale});
|
||||
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
|
||||
@ -74,5 +74,5 @@
|
||||
* Label text should not extend
|
||||
* beyond the bounds of the select.
|
||||
*/
|
||||
max-width: calc(100% / #{$select-floating-label-scale});
|
||||
max-width: calc(100% / #{$form-control-label-stacked-scale});
|
||||
}
|
||||
|
||||
@ -513,11 +513,11 @@ button {
|
||||
:host(.select-expanded.select-label-placement-floating) .label-text-wrapper,
|
||||
:host(.ion-focused.select-label-placement-floating) .label-text-wrapper,
|
||||
:host(.has-value.select-label-placement-floating) .label-text-wrapper {
|
||||
@include transform(translateY(50%), scale(#{$select-floating-label-scale}));
|
||||
@include transform(translateY(50%), scale(#{$form-control-label-stacked-scale}));
|
||||
|
||||
/**
|
||||
* Label text should not extend
|
||||
* beyond the bounds of the input.
|
||||
*/
|
||||
max-width: calc(100% / #{$select-floating-label-scale});
|
||||
max-width: calc(100% / #{$form-control-label-stacked-scale});
|
||||
}
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
/// @prop - How much to scale the floating label by
|
||||
$select-floating-label-scale: 0.75 !default;
|
||||
|
||||
/// @prop - Margin start of the select icon
|
||||
$select-icon-margin-start: 4px !default;
|
||||
|
||||
Reference in New Issue
Block a user