From c836fb3448dae8408217cc6f666c781d6e8916ea Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 29 Jul 2024 10:52:35 -0400 Subject: [PATCH] Move negative margin on checkboxes/radios (#4458) Move it from the parent element (, ) to the first child (.checkbox-check, .radio-check). This way, margins set by classes like .indented-pref don't negate our global styles. --- scss/components/_button.scss | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scss/components/_button.scss b/scss/components/_button.scss index 92fc83cd7b..b09d5e7df4 100644 --- a/scss/components/_button.scss +++ b/scss/components/_button.scss @@ -39,7 +39,7 @@ button { } } -// Zero-priority default margins/paddings for button elements on macOS: +// Default margins/paddings for button elements on macOS: :is(button, toolbarbutton) .button-text { @media (-moz-platform: macos) { @@ -58,7 +58,6 @@ radiogroup { radio, checkbox { @media (-moz-platform: macos) { margin: 0; - margin-inline-start: -2px; gap: 6px; } } @@ -68,7 +67,12 @@ checkbox :is(.checkbox-check, .checkbox-check[checked], .checkbox-icon, .checkbo @media (-moz-platform: macos) { margin: 0; - // Can't break this out into a separate rule because of specificity + // Can't break these out into separate rules because of specificity: + + &:is(.radio-check, .checkbox-check) { + margin-inline-start: -2px; + } + &:is(.checkbox-label) { margin-top: -1px; }