Move negative margin on checkboxes/radios (#4458)

Move it from the parent element (<checkbox>, <radio>) to the first child
(.checkbox-check, .radio-check). This way, margins set by classes like
.indented-pref don't negate our global styles.
This commit is contained in:
Abe Jellinek 2024-07-29 10:52:35 -04:00 committed by Dan Stillman
parent fadcdcaef9
commit c836fb3448

View file

@ -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;
}