mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
44 lines
888 B
SCSS
44 lines
888 B
SCSS
$length: 18px;
|
|
$padding: 26px;
|
|
|
|
.checkbox {
|
|
display: flex;
|
|
position: relative;
|
|
padding-left: $padding;
|
|
cursor: pointer;
|
|
line-height: $length;
|
|
|
|
&::before {
|
|
content: '';
|
|
display: inline-block;
|
|
position: absolute;
|
|
left: 0;
|
|
top: 50%;
|
|
width: $length;
|
|
height: $length;
|
|
border-radius: 3px;
|
|
transition: background-color 0.3s ease;
|
|
transform: translateY(-$length / 2);
|
|
background-color: $color-white;
|
|
border: 1px solid $color-primary-lightly;
|
|
}
|
|
|
|
&.checked::before {
|
|
background-color: $color-primary;
|
|
}
|
|
}
|
|
|
|
.checkbox-icon {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 50%;
|
|
line-height: $length;
|
|
transform: translateY(-$length / 2) scale(0.6);
|
|
text-shadow: none;
|
|
font-weight: bold;
|
|
|
|
&.checkbox-icon {
|
|
color: $color-white;
|
|
}
|
|
}
|