From c470e9fde551ba9f3327376516aa123c439f586f Mon Sep 17 00:00:00 2001 From: sivanova Date: Fri, 26 Jan 2024 12:48:02 +0200 Subject: [PATCH 1/3] fix(btn-group): disabled state in safari --- src/components/button-group/themes/button.base.scss | 2 -- .../button-group/themes/shared/button/button.common.scss | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/button-group/themes/button.base.scss b/src/components/button-group/themes/button.base.scss index 85baf9010..2980b27ce 100644 --- a/src/components/button-group/themes/button.base.scss +++ b/src/components/button-group/themes/button.base.scss @@ -46,8 +46,6 @@ $transition: all 140ms cubic-bezier(0.455, 0.03, 0.515, 0.955); } } -:host-context(:disabled), -:host-context([disabled]), :host(:disabled), :host([disabled]) { cursor: default; diff --git a/src/components/button-group/themes/shared/button/button.common.scss b/src/components/button-group/themes/shared/button/button.common.scss index 08ac47380..d809ae927 100644 --- a/src/components/button-group/themes/shared/button/button.common.scss +++ b/src/components/button-group/themes/shared/button/button.common.scss @@ -44,9 +44,7 @@ $theme: $material; } :host([disabled]), -:host(:disabled), -:host-context([disabled]), -:host-context(:disabled) { +:host(:disabled) { [part~='toggle'] { color: var-get($theme, 'disabled-text-color'); background: var-get($theme, 'disabled-background-color'); From 07cf4aa8f52d3fe97cdbbcd7b0c1bc1d5a1f459c Mon Sep 17 00:00:00 2001 From: sivanova Date: Mon, 29 Jan 2024 11:11:21 +0200 Subject: [PATCH 2/3] fix(btn-group): add host-context styles --- .../button-group/themes/button.base.scss | 6 ++++++ .../themes/shared/button/button.common.scss | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/components/button-group/themes/button.base.scss b/src/components/button-group/themes/button.base.scss index 2980b27ce..f0e4785ad 100644 --- a/src/components/button-group/themes/button.base.scss +++ b/src/components/button-group/themes/button.base.scss @@ -52,6 +52,12 @@ $transition: all 140ms cubic-bezier(0.455, 0.03, 0.515, 0.955); pointer-events: none; } +:host-context(:disabled), +:host-context([disabled]) { + cursor: default; + pointer-events: none; +} + :host([selected]:disabled), :host([selected][disabled]) { [part~='toggle'] { diff --git a/src/components/button-group/themes/shared/button/button.common.scss b/src/components/button-group/themes/shared/button/button.common.scss index d809ae927..a94754258 100644 --- a/src/components/button-group/themes/shared/button/button.common.scss +++ b/src/components/button-group/themes/shared/button/button.common.scss @@ -3,6 +3,14 @@ $theme: $material; +@mixin disabled { + [part~='toggle'] { + color: var-get($theme, 'disabled-text-color'); + background: var-get($theme, 'disabled-background-color'); + border-color: var-get($theme, 'item-disabled-border'); + } +} + :host { [part~='toggle'] { $icon-size: rem(18px); @@ -45,9 +53,10 @@ $theme: $material; :host([disabled]), :host(:disabled) { - [part~='toggle'] { - color: var-get($theme, 'disabled-text-color'); - background: var-get($theme, 'disabled-background-color'); - border-color: var-get($theme, 'item-disabled-border'); - } + @include disabled; } + +:host-context([disabled]), +:host-context(:disabled) { + @include disabled; +} \ No newline at end of file From 31aec7deb09479763bbddcc002cd81b33b101963 Mon Sep 17 00:00:00 2001 From: Silvia Ivanova <59446295+SisIvanova@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:17:19 +0200 Subject: [PATCH 3/3] Update button.common.scss --- .../button-group/themes/shared/button/button.common.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/button-group/themes/shared/button/button.common.scss b/src/components/button-group/themes/shared/button/button.common.scss index a94754258..f860c650a 100644 --- a/src/components/button-group/themes/shared/button/button.common.scss +++ b/src/components/button-group/themes/shared/button/button.common.scss @@ -53,10 +53,10 @@ $theme: $material; :host([disabled]), :host(:disabled) { - @include disabled; + @include disabled(); } :host-context([disabled]), :host-context(:disabled) { - @include disabled; -} \ No newline at end of file + @include disabled(); +}