mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
75 lines
1.3 KiB
SCSS
75 lines
1.3 KiB
SCSS
$checked-color: #006148;
|
|
$unchecked-color: #888;
|
|
|
|
.slider-checkbox {
|
|
position: relative;
|
|
|
|
input {
|
|
width: 40px; height: 20px;
|
|
top: 0; left: 0;
|
|
|
|
background-color: red;
|
|
cursor: pointer;
|
|
margin: 1px 0 0 0;
|
|
opacity: 0;
|
|
position: absolute;
|
|
z-index: 1;
|
|
|
|
&:not(:checked) + .label {
|
|
&::before {
|
|
background-color: $unchecked-color;
|
|
content: "\f00d";
|
|
padding-left: 18px;
|
|
text-align: center;
|
|
}
|
|
|
|
&::after {
|
|
left: 1px;
|
|
}
|
|
}
|
|
|
|
&:checked + .label {
|
|
&::before {
|
|
background-color: $checked-color;
|
|
content: "\f00c";
|
|
padding-right: 17px;
|
|
text-align: center;
|
|
}
|
|
|
|
&::after {
|
|
left: 21px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.label {
|
|
padding-left: 40px;
|
|
position: relative;
|
|
|
|
&::before,
|
|
&::after {
|
|
border-radius: 0;
|
|
position: absolute;
|
|
transition: background-color 0.3s, left 0.3s;
|
|
}
|
|
|
|
&::before {
|
|
width: 40px; height: 20px;
|
|
top: 0; left: 0;
|
|
|
|
box-sizing: border-box;
|
|
color: white;
|
|
font-family: 'FontAwesome', sans-serif;
|
|
font-size: 12px;
|
|
line-height: 20px;
|
|
}
|
|
|
|
&::after {
|
|
width: 18px; height: 18px;
|
|
|
|
background-color: white;
|
|
content: "";
|
|
top: 1px;
|
|
}
|
|
}
|
|
}
|