From 004b2c13c0d1577d13840b841fa27cb26711d81a Mon Sep 17 00:00:00 2001 From: Denis Severin Date: Fri, 27 Oct 2023 15:35:26 +0300 Subject: [PATCH] fix(styles): input and select disabled placeholder [ci visual] --- packages/styles/src/mixins/_forms.scss | 2 ++ packages/styles/src/select.scss | 14 ++++++++++++++ .../Components/Forms/input/primary.example.html | 2 +- .../stories/Components/select/cozy.example.html | 4 ++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/styles/src/mixins/_forms.scss b/packages/styles/src/mixins/_forms.scss index 7a980dea13..ecf269b154 100644 --- a/packages/styles/src/mixins/_forms.scss +++ b/packages/styles/src/mixins/_forms.scss @@ -239,6 +239,7 @@ $fd-input-field-height--compact: 1.625rem; @if ($supportsText) { &::placeholder { + opacity: 0; color: var(--fdInput_Non_Interactive_State_Placeholder_Color); } } @@ -249,6 +250,7 @@ $fd-input-field-height--compact: 1.625rem; @if ($supportsText) { &::placeholder { + opacity: 0; color: var(--fdInput_Non_Interactive_State_Placeholder_Color); } } diff --git a/packages/styles/src/select.scss b/packages/styles/src/select.scss index e049d6f25a..eacc17aa55 100644 --- a/packages/styles/src/select.scss +++ b/packages/styles/src/select.scss @@ -63,11 +63,25 @@ $fd-select-padding-x-compact: 0.5rem; --fdSelect_Min_Width: 5rem; } + &[aria-selected='false'] { + .#{$block}__text-content { + visibility: hidden; + } + } + .#{$block}__button { opacity: 0; } } + @include fd-disabled() { + &[aria-selected='false'] { + .#{$block}__text-content { + visibility: hidden; + } + } + } + &[aria-selected='false'] { .#{$block}__text-content { font-style: italic; diff --git a/packages/styles/stories/Components/Forms/input/primary.example.html b/packages/styles/stories/Components/Forms/input/primary.example.html index 24f05a3381..f693af57f8 100644 --- a/packages/styles/stories/Components/Forms/input/primary.example.html +++ b/packages/styles/stories/Components/Forms/input/primary.example.html @@ -86,7 +86,7 @@
- +

diff --git a/packages/styles/stories/Components/select/cozy.example.html b/packages/styles/stories/Components/select/cozy.example.html index fb2ec2fb8b..eb5108159c 100644 --- a/packages/styles/stories/Components/select/cozy.example.html +++ b/packages/styles/stories/Components/select/cozy.example.html @@ -114,7 +114,7 @@
-
+