From 4651317d0d50aaae84b6e67917b2f76c180202be Mon Sep 17 00:00:00 2001 From: sivanova Date: Thu, 30 Oct 2025 15:18:48 +0200 Subject: [PATCH] fix(select): style component using sass theme --- src/components/select/themes/shared/select.common.scss | 9 ++++++++- src/components/select/themes/shared/select.fluent.scss | 7 ------- src/components/select/themes/shared/select.material.scss | 4 ---- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/components/select/themes/shared/select.common.scss b/src/components/select/themes/shared/select.common.scss index 612db6b33..0e5ee8b1d 100644 --- a/src/components/select/themes/shared/select.common.scss +++ b/src/components/select/themes/shared/select.common.scss @@ -34,7 +34,7 @@ $dropdown-theme: dropdown-theme.$material; :host(:focus-within) { [part~='toggle-icon'] { - background: var-get($theme, 'toggle-button-background-focus--border'); + background: var-get($theme, 'toggle-button-background-focus'); color: var-get($theme, 'toggle-button-foreground-focus'); igc-icon { @@ -43,6 +43,13 @@ $dropdown-theme: dropdown-theme.$material; } } +:host(:not(:focus-within, [disabled])), +:host(:not(:focus-within, :disabled)) { + [part='toggle-icon filled'] { + color: var-get($theme, 'toggle-button-foreground-filled'); + } +} + :host([disabled]), :host(:disabled) { ::part(helper-text) { diff --git a/src/components/select/themes/shared/select.fluent.scss b/src/components/select/themes/shared/select.fluent.scss index d8bb62d0a..230a93816 100644 --- a/src/components/select/themes/shared/select.fluent.scss +++ b/src/components/select/themes/shared/select.fluent.scss @@ -32,13 +32,6 @@ $input-theme: input-theme.$fluent; } } -:host(:focus-within) { - [part~='toggle-icon'] { - background: var-get($theme, 'toggle-button-background-focus'); - } - -} - :host(:not(:state(ig-invalid)):focus-within) { igc-input[readonly]:not([disabled])::part(container) { &::before { diff --git a/src/components/select/themes/shared/select.material.scss b/src/components/select/themes/shared/select.material.scss index f440522d5..06dccef3f 100644 --- a/src/components/select/themes/shared/select.material.scss +++ b/src/components/select/themes/shared/select.material.scss @@ -88,10 +88,6 @@ $active-border-width: rem(2px) !default; } } -[part='toggle-icon filled'] { - color: var-get($theme, 'toggle-button-foreground-filled'); -} - :host([disabled]), :host(:disabled) { igc-input::part(input)::selection {