From e414e6029b257f1b0047936792ced8776dd1caa5 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 2 May 2024 12:21:37 -0400 Subject: [PATCH] Prevent Windows button defaults from overriding other styles --- scss/win/components/_button.scss | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scss/win/components/_button.scss b/scss/win/components/_button.scss index 5c25d98556..1eeb65f591 100644 --- a/scss/win/components/_button.scss +++ b/scss/win/components/_button.scss @@ -1,6 +1,10 @@ -// skip React Button element -button:not(.btn, [type=checkbox], [type=radio]), -input:is([type=button], [type=submit]) { +// Use :where to reset specificity to 0 +// https://css-tricks.com/using-the-specificity-of-where-as-a-css-reset/ +:where( + // skip React Button element + button:not(.btn, [type=checkbox], [type=radio]), + input:is([type=button], [type=submit]) +) { @include windows-form-element; padding: 4px 11px 6px 11px;