2018-11-26 18:47:56 +00:00
|
|
|
.switch[type='checkbox'] {
|
2018-04-03 14:16:57 +00:00
|
|
|
&.is-small {
|
|
|
|
+ label {
|
2018-10-09 04:19:58 +00:00
|
|
|
font-size: $size-8;
|
2018-04-03 14:16:57 +00:00
|
|
|
font-weight: bold;
|
2018-10-09 04:19:58 +00:00
|
|
|
padding-left: $size-8 * 2.5;
|
2018-04-03 14:16:57 +00:00
|
|
|
margin: 0 0.25rem;
|
|
|
|
&::before {
|
2018-10-09 04:19:58 +00:00
|
|
|
top: $size-8 / 5;
|
|
|
|
height: $size-8;
|
|
|
|
width: $size-8 * 2;
|
2018-04-03 14:16:57 +00:00
|
|
|
}
|
|
|
|
&::after {
|
2018-10-09 04:19:58 +00:00
|
|
|
width: $size-8 * 0.8;
|
|
|
|
height: $size-8 * 0.8;
|
|
|
|
transform: translateX(0.15rem);
|
2018-10-10 04:46:29 +00:00
|
|
|
left: 0;
|
2018-10-09 04:19:58 +00:00
|
|
|
top: $size-8/ 4;
|
2018-04-03 14:16:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
&:checked + label::after {
|
2018-10-09 04:19:58 +00:00
|
|
|
left: 0;
|
2018-10-10 04:46:29 +00:00
|
|
|
transform: translateX(($size-8 * 2) - ($size-8 * 0.94));
|
2018-04-03 14:16:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-11-26 18:47:56 +00:00
|
|
|
.switch[type='checkbox'].is-small + label::after {
|
2018-10-10 04:46:29 +00:00
|
|
|
will-change: left;
|
2018-10-09 04:19:58 +00:00
|
|
|
}
|
2018-11-26 18:47:56 +00:00
|
|
|
.switch[type='checkbox']:focus + label {
|
2018-04-03 14:16:57 +00:00
|
|
|
box-shadow: 0 0 1px $blue;
|
|
|
|
}
|
2018-11-26 18:47:56 +00:00
|
|
|
.switch[type='checkbox'].is-success:checked + label::before {
|
2018-10-09 04:19:58 +00:00
|
|
|
background: $blue;
|
|
|
|
}
|