zotero/scss/win/components/_checkbox.scss
Dan Stillman 6fbe5e4135 fx153: Match XUL boolean attributes in selectors without a value
Bug 2008041 made disabled, checked, hidden, collapsed, and selected
boolean attributes, so their value is empty and [disabled="true"] no
longer matches. Nothing sets any of them to "false", so matching on
presence alone is equivalent.
2026-08-03 11:48:40 -04:00

74 lines
1.5 KiB
SCSS

@mixin -make-checkbox-icon($state) {
& :is(.checkbox-check) {
@include focus-states using ($color) {
background-image: url('chrome://zotero/skin/win/#{$color}/checkbox-#{$state}.svg');
&[checked] {
background-image: url('chrome://zotero/skin/win/#{$color}/checkbox-selected-#{$state}.svg');
}
}
}
}
:is(checkbox[native]) {
appearance: none;
height: 28px;
gap: 8px;
padding-inline: 4px 8px;
border-radius: 4px;
--checkbox-border-color: transparent;
--checkbox-unchecked-bgcolor: transparent;
--checkbox-unchecked-hover-bgcolor: transparent;
--checkbox-unchecked-active-bgcolor: transparent;
--checkbox-checked-border-color: transparent;
--checkbox-checked-bgcolor: transparent;
--checkbox-checked-color: transparent;
--checkbox-checked-hover-bgcolor: transparent;
--checkbox-checked-active-bgcolor: transparent;
.checkbox-check {
appearance: none;
background-position: center;
background-repeat: no-repeat;
width: 16px;
height: 16px;
border-radius: 4px;
margin-inline-end: 0px;
}
@include -make-checkbox-icon("rest");
&:not([disabled]) {
&:hover {
@include -make-checkbox-icon("hover");
}
&:hover:active {
@include -make-checkbox-icon("active");
}
}
&:disabled,
&[disabled] {
@include -make-checkbox-icon("disabled");
}
}
checkbox[native]:focus-visible {
& > .checkbox-label-box {
outline: none;
}
&:not([disabled]) {
&[label] {
@include focus-ring(false, "");
}
&:not([label]) {
& :is(.checkbox-check) {
@include focus-ring(false, "");
}
}
}
}