From 6642ddac7fc5594b872ae30274acfb8888622ba7 Mon Sep 17 00:00:00 2001 From: Kin Ueng Date: Tue, 19 Oct 2021 13:40:11 -0500 Subject: [PATCH 1/2] fix(button): hcm for ghost icon color contrast - #9903 --- packages/components/src/components/button/_button.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/components/src/components/button/_button.scss b/packages/components/src/components/button/_button.scss index 307d9914392d..04d88b278dc2 100644 --- a/packages/components/src/components/button/_button.scss +++ b/packages/components/src/components/button/_button.scss @@ -285,6 +285,9 @@ path:not([data-icon-path]):not([fill='none']), .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only .#{$prefix}--btn__icon { fill: $icon-01; + @include high-contrast-mode { + fill: $icon-03; + } } .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only[disabled] From 0edc279b5d995288557a6107f650821136cc53a1 Mon Sep 17 00:00:00 2001 From: Taylor Jones Date: Wed, 20 Oct 2021 10:32:12 -0500 Subject: [PATCH 2/2] fix(button): hcm iconOnly fill fix, mirror to styles package --- .../components/src/components/button/_button.scss | 12 +++++++++--- packages/styles/scss/components/button/_button.scss | 9 +++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/components/src/components/button/_button.scss b/packages/components/src/components/button/_button.scss index 04d88b278dc2..621372083de3 100644 --- a/packages/components/src/components/button/_button.scss +++ b/packages/components/src/components/button/_button.scss @@ -285,9 +285,6 @@ path:not([data-icon-path]):not([fill='none']), .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only .#{$prefix}--btn__icon { fill: $icon-01; - @include high-contrast-mode { - fill: $icon-03; - } } .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only[disabled] @@ -526,6 +523,15 @@ .#{$prefix}--btn:focus { @include high-contrast-mode('focus'); } + + // Windows HCM fix + // stylelint-disable-next-line no-duplicate-selectors + .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only + .#{$prefix}--btn__icon + path:not([data-icon-path]):not([fill='none']), + .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only .#{$prefix}--btn__icon { + @include high-contrast-mode('icon-fill'); + } } @include exports('button') { diff --git a/packages/styles/scss/components/button/_button.scss b/packages/styles/scss/components/button/_button.scss index 6b32ccdae45b..d89b56c32fc1 100644 --- a/packages/styles/scss/components/button/_button.scss +++ b/packages/styles/scss/components/button/_button.scss @@ -525,4 +525,13 @@ .#{$prefix}--btn:focus { @include high-contrast-mode('focus'); } + + // Windows HCM fix + // stylelint-disable-next-line no-duplicate-selectors + .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only + .#{$prefix}--btn__icon + path:not([data-icon-path]):not([fill='none']), + .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only .#{$prefix}--btn__icon { + @include high-contrast-mode('icon-fill'); + } }