zotero/scss/win/components/_radio.scss
windingwind a0a8cceda4
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
Checkbox-and-radio-redesign-on-Windows (#4609)
2024-08-30 07:20:52 -04:00

70 lines
1.2 KiB
SCSS

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