From b1442274383a8ba83e6ec94e24d04becb5988b88 Mon Sep 17 00:00:00 2001 From: Andrew Jakubowicz Date: Wed, 16 Aug 2023 14:21:14 -0700 Subject: [PATCH] fix(button): incorrect HCM colors PiperOrigin-RevId: 557601131 --- button/internal/_outlined-button.scss | 6 ++++++ button/internal/_shared.scss | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/button/internal/_outlined-button.scss b/button/internal/_outlined-button.scss index daddafa8ed..d5d0b3db8b 100644 --- a/button/internal/_outlined-button.scss +++ b/button/internal/_outlined-button.scss @@ -83,6 +83,12 @@ border-color: var(--_disabled-outline-color); opacity: var(--_disabled-outline-opacity); } + + @media (forced-colors: active) { + .button:disabled & { + opacity: 1; + } + } } .button__outline, diff --git a/button/internal/_shared.scss b/button/internal/_shared.scss index 4eb9e2aa1a..c4450b5e0a 100644 --- a/button/internal/_shared.scss +++ b/button/internal/_shared.scss @@ -118,12 +118,18 @@ &::before { content: ''; box-sizing: border-box; - border: 1px solid transparent; + border: 1px solid CanvasText; border-radius: inherit; inset: 0; pointer-events: none; position: absolute; } + + &:disabled { + --_disabled-icon-opacity: 1; + --_disabled-container-opacity: 1; + --_disabled-label-text-opacity: 1; + } } }