mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-19 13:25:58 +08:00
96 lines
1.7 KiB
SCSS
96 lines
1.7 KiB
SCSS
// scss-lint:disable SelectorDepth SelectorFormat QualifyingElement
|
|
// scss-lint:disable NestingDepth ImportantRule
|
|
|
|
@import "constants";
|
|
@import "mixins";
|
|
|
|
input[type="checkbox"].simple-checkbox {
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
height: 14px;
|
|
margin: 0;
|
|
opacity: 0;
|
|
position: relative;
|
|
width: 14px;
|
|
z-index: 2;
|
|
|
|
+ .checkbox-label {
|
|
|
|
display: inline-block;
|
|
flex-shrink: 0;
|
|
height: 14px;
|
|
margin-left: -15px;
|
|
position: relative;
|
|
width: 14px;
|
|
|
|
&::before {
|
|
content: "\f0c8";
|
|
font-family: "Font Awesome 5 Free";
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
left: 0;
|
|
line-height: 14px;
|
|
position: absolute;
|
|
text-align: center;
|
|
top: 1px;
|
|
width: 14px;
|
|
}
|
|
}
|
|
|
|
&.hidden + .checkbox-label {
|
|
display: none;
|
|
}
|
|
|
|
&:checked + .checkbox-label {
|
|
&::before {
|
|
content: "\f14a";
|
|
}
|
|
}
|
|
}
|
|
|
|
input[type="checkbox"].trigger-checkbox {
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
height: 16px;
|
|
margin: 0;
|
|
opacity: 0;
|
|
position: relative;
|
|
width: 24px;
|
|
z-index: 2;
|
|
|
|
+ .checkbox-label {
|
|
background: $color-silver-chalice;
|
|
border-radius: 8px;
|
|
display: inline-block;
|
|
flex-shrink: 0;
|
|
height: 16px;
|
|
margin-left: -24px;
|
|
position: relative;
|
|
transition: .2s;
|
|
width: 24px;
|
|
|
|
&::before {
|
|
background: $color-white;
|
|
border-radius: 7px;
|
|
content: "";
|
|
height: 12px;
|
|
left: 0;
|
|
margin: 2px;
|
|
position: absolute;
|
|
transition: .2s;
|
|
width: 12px;
|
|
}
|
|
}
|
|
|
|
&.hidden + .checkbox-label {
|
|
display: none;
|
|
}
|
|
|
|
&:checked + .checkbox-label {
|
|
background: $brand-success;
|
|
|
|
&::before {
|
|
left: 8px;
|
|
}
|
|
}
|
|
}
|