Skip to content

Commit

Permalink
fix(select): floating label styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Nov 10, 2024
1 parent 0fc6b24 commit 6b193c2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/core/src/form/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -543,16 +543,21 @@ $variables: (
@if not
$disable-text-field or not
$disable-password or not
$disable-textarea
$disable-textarea or not
$disable-select
{
$text-field-floating: ", .rmd-text-field:where(:not(:placeholder-shown))" +
if($disable-select, "", " ~ :where(:not(.rmd-select))") +
" ~ &--floating";

$floating-active-selector: $floating-active-selector +
", .rmd-text-field-container:focus-within &--floating" +
", .rmd-text-field:not(:placeholder-shown) ~ &--floating";
$text-field-floating;
}
@if not $disable-native-select {
$floating-active-selector: $floating-active-selector +
", .rmd-native-select[multiple] ~ &--floating" +
", .rmd-native-select:not(:invalid) ~ &--floating";
", .rmd-native-select:where(:not(:invalid)) ~ &--floating";
}

#{$floating-active-selector} {
Expand Down

0 comments on commit 6b193c2

Please sign in to comment.