From 6b193c20c103db86ba671c9a506ed91bc7361943 Mon Sep 17 00:00:00 2001 From: Mikkel Laursen Date: Sun, 10 Nov 2024 11:31:59 -0500 Subject: [PATCH] fix(select): floating label styles --- packages/core/src/form/_form.scss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/core/src/form/_form.scss b/packages/core/src/form/_form.scss index 0e8d3e1f5d..c6b15ccfdb 100644 --- a/packages/core/src/form/_form.scss +++ b/packages/core/src/form/_form.scss @@ -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} {