From a26c212d1ad3bfac167545d4ffd59379debbb49c Mon Sep 17 00:00:00 2001 From: Patrick Fulton Date: Tue, 14 Jun 2022 10:19:37 -0400 Subject: [PATCH] fix(actionbutton, closebutton, picker): remove `!important` declarations This removes the `!important` declarations that were placed upon `box-shadow`s to forcefully remove focus rings. Using `!important` was causing problems for folks who were trying to customize the focus rings, especially in a Windows High Contrast Mode context. --- components/actionbutton/index.css | 3 ++- components/closebutton/index.css | 2 +- components/picker/index.css | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/actionbutton/index.css b/components/actionbutton/index.css index 978fa2d650d..5e0bfc69719 100644 --- a/components/actionbutton/index.css +++ b/components/actionbutton/index.css @@ -232,7 +232,8 @@ a.spectrum-ActionButton { } &:focus-ring { - box-shadow: none !important; + /* kill the default ring */ + box-shadow: none; &:after { box-shadow: 0 0 0 var(--mod-actionbutton-focus-ring-thickness, var(--spectrum-actionbutton-focus-ring-thickness)) var(--highcontrast-actionbutton-focus-ring-color, var(--mod-actionbutton-focus-ring-color, var(--spectrum-actionbutton-focus-ring-color))); diff --git a/components/closebutton/index.css b/components/closebutton/index.css index c948bddee21..c7492fd8641 100644 --- a/components/closebutton/index.css +++ b/components/closebutton/index.css @@ -51,7 +51,7 @@ a.spectrum-CloseButton { &:focus-ring { /* kill the default ring */ - box-shadow: none !important; + box-shadow: none; &:after { box-shadow: 0 0 0 var(--spectrum-closebutton-focus-ring-size) var(--spectrum-closebutton-focus-ring-color); diff --git a/components/picker/index.css b/components/picker/index.css index 1c51359063a..201727dd6ea 100644 --- a/components/picker/index.css +++ b/components/picker/index.css @@ -137,7 +137,7 @@ governing permissions and limitations under the License. &:focus-ring { /* kill the default ring */ - box-shadow: none !important; + box-shadow: none; &:after { box-shadow: 0 0 0 var(--spectrum-picker-focus-ring-size) var(--spectrum-picker-focus-ring-color);