2015-07-17 13:17:49 +08:00
|
|
|
.Checkbox {
|
|
|
|
display: block;
|
|
|
|
cursor: pointer;
|
|
|
|
margin: 0;
|
|
|
|
|
2020-04-11 04:51:58 +08:00
|
|
|
& input[type="checkbox"] {
|
2015-07-17 13:17:49 +08:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.Checkbox--switch {
|
|
|
|
padding-left: 65px;
|
|
|
|
margin: 5px 0;
|
|
|
|
|
|
|
|
.Checkbox-display {
|
|
|
|
float: left;
|
|
|
|
margin-left: -65px;
|
|
|
|
margin-top: -4px;
|
|
|
|
|
|
|
|
.LoadingIndicator {
|
|
|
|
display: inline-block;
|
2020-04-11 04:51:58 +08:00
|
|
|
margin-left: 20px;
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.Checkbox--switch .Checkbox-display {
|
|
|
|
width: 50px;
|
|
|
|
height: 28px;
|
|
|
|
padding: 3px;
|
|
|
|
position: relative;
|
|
|
|
border-radius: 14px;
|
|
|
|
background: @control-bg;
|
|
|
|
.transition(background-color 0.2s);
|
|
|
|
|
|
|
|
.on& {
|
2020-04-11 04:51:58 +08:00
|
|
|
background: #58a400;
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
position: absolute;
|
|
|
|
width: 22px;
|
|
|
|
height: 22px;
|
|
|
|
padding: 0;
|
|
|
|
left: 3px;
|
|
|
|
.transition(~"opacity 0.2s, left 0.2s");
|
|
|
|
|
|
|
|
.on& {
|
|
|
|
left: 25px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:before {
|
2020-04-11 04:51:58 +08:00
|
|
|
content: " ";
|
2015-07-17 13:17:49 +08:00
|
|
|
background: @body-bg;
|
|
|
|
border-radius: 11px;
|
|
|
|
box-shadow: 0 2px 4px @shadow-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.Checkbox-display {
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
.on & {
|
2020-04-11 04:51:58 +08:00
|
|
|
color: #58a400;
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|
|
|
|
.off & {
|
2020-04-11 04:51:58 +08:00
|
|
|
color: #d0021b;
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|
|
|
|
.disabled & {
|
|
|
|
color: @muted-more-color !important;
|
|
|
|
}
|
|
|
|
}
|
2020-04-11 04:51:58 +08:00
|
|
|
.Checkbox--switch.loading {
|
|
|
|
color: @muted-more-color !important;
|
|
|
|
|
|
|
|
&.on .Checkbox-display {
|
|
|
|
background: fade(#58a400, 0.5);
|
|
|
|
}
|
|
|
|
&.off .Checkbox-display {
|
|
|
|
background: fade(@control-bg, 0.5);
|
|
|
|
}
|
|
|
|
.LoadingIndicator {
|
|
|
|
color: darken(@muted-color, 50%);
|
|
|
|
}
|
|
|
|
}
|