From cd4cae1ae86357c978a12ddfbe4998d4aa464ded Mon Sep 17 00:00:00 2001 From: sivanova Date: Wed, 12 Nov 2025 14:50:20 +0200 Subject: [PATCH] fix(snackbar): style component using sass theme --- .../snackbar/themes/shared/snackbar.bootstrap.scss | 8 -------- .../snackbar/themes/shared/snackbar.common.scss | 6 ++++++ .../snackbar/themes/shared/snackbar.fluent.scss | 5 ----- .../snackbar/themes/shared/snackbar.indigo.scss | 12 ------------ src/components/snackbar/themes/snackbar.base.scss | 4 ++++ src/components/snackbar/themes/themes.ts | 5 ++--- 6 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 src/components/snackbar/themes/shared/snackbar.bootstrap.scss diff --git a/src/components/snackbar/themes/shared/snackbar.bootstrap.scss b/src/components/snackbar/themes/shared/snackbar.bootstrap.scss deleted file mode 100644 index 5ab8e8f52..000000000 --- a/src/components/snackbar/themes/shared/snackbar.bootstrap.scss +++ /dev/null @@ -1,8 +0,0 @@ -@use 'styles/utilities' as *; -@use '../light/themes' as *; - -$theme: $bootstrap; - -igc-button::part(base):hover { - color: var-get($theme, 'button-color'); -} diff --git a/src/components/snackbar/themes/shared/snackbar.common.scss b/src/components/snackbar/themes/shared/snackbar.common.scss index 5f67c8faf..873ac18dd 100644 --- a/src/components/snackbar/themes/shared/snackbar.common.scss +++ b/src/components/snackbar/themes/shared/snackbar.common.scss @@ -9,3 +9,9 @@ $theme: $material; background: var-get($theme, 'background'); box-shadow: var-get($theme, 'elevation'); } + +igc-button::part(base), +igc-button::part(base):hover { + color: var-get($theme, 'button-color'); + background: transparent; +} diff --git a/src/components/snackbar/themes/shared/snackbar.fluent.scss b/src/components/snackbar/themes/shared/snackbar.fluent.scss index 59d4378df..0c5876696 100644 --- a/src/components/snackbar/themes/shared/snackbar.fluent.scss +++ b/src/components/snackbar/themes/shared/snackbar.fluent.scss @@ -7,11 +7,6 @@ $theme: $fluent; @include type-style('caption'); } -igc-button::part(base), -igc-button::part(base):hover { - color: var-get($theme, 'button-color'); -} - igc-button::part(base):focus-visible::after { display: none; } diff --git a/src/components/snackbar/themes/shared/snackbar.indigo.scss b/src/components/snackbar/themes/shared/snackbar.indigo.scss index 2e1d81871..2aa28838d 100644 --- a/src/components/snackbar/themes/shared/snackbar.indigo.scss +++ b/src/components/snackbar/themes/shared/snackbar.indigo.scss @@ -3,19 +3,7 @@ $theme: $indigo; -:host { - igc-button { - --ig-size: 2; - } -} - [part~='base'] { min-height: rem(36px); padding: pad-block(rem(4px)) pad-inline(rem(16px)); } - -igc-button::part(base), -igc-button::part(base):hover { - color: var-get($theme, 'button-color'); - box-shadow: none; -} diff --git a/src/components/snackbar/themes/snackbar.base.scss b/src/components/snackbar/themes/snackbar.base.scss index 65146a2cb..b874309c1 100644 --- a/src/components/snackbar/themes/snackbar.base.scss +++ b/src/components/snackbar/themes/snackbar.base.scss @@ -6,6 +6,10 @@ font-family: var(--ig-font-family); inset-inline: 50% auto; transform: translateX(calc(-50% + .5px)); + + igc-button { + --ig-size: 2; + } } :host([position='bottom']) { diff --git a/src/components/snackbar/themes/themes.ts b/src/components/snackbar/themes/themes.ts index 11e65fd08..3ca17dff7 100644 --- a/src/components/snackbar/themes/themes.ts +++ b/src/components/snackbar/themes/themes.ts @@ -13,7 +13,6 @@ import { styles as indigoLight } from './light/snackbar.indigo.css.js'; import { styles as materialLight } from './light/snackbar.material.css.js'; import { styles as shared } from './light/snackbar.shared.css.js'; // Shared Styles -import { styles as bootstrap } from './shared/snackbar.bootstrap.css.js'; import { styles as fluent } from './shared/snackbar.fluent.css.js'; import { styles as indigo } from './shared/snackbar.indigo.css.js'; @@ -22,7 +21,7 @@ const light = { ${shared} `, bootstrap: css` - ${bootstrap} ${bootstrapLight} + ${bootstrapLight} `, material: css` ${materialLight} @@ -40,7 +39,7 @@ const dark = { ${shared} `, bootstrap: css` - ${bootstrap} ${bootstrapDark} + ${bootstrapDark} `, material: css` ${materialDark}