2017-09-05 21:33:08 +00:00
|
|
|
/* On/Off FlipSwitch https://proto.io/freebies/onoff/ */
|
|
|
|
|
2018-10-12 20:30:33 +00:00
|
|
|
:root {
|
|
|
|
--slider-enabled-bg: hsl(165, 45%, 84%);
|
|
|
|
--slider-enabled-border: hsl(165, 45%, 82%);
|
|
|
|
--slider-enabled-circle: hsl(171, 96%, 37%);
|
|
|
|
}
|
|
|
|
|
2017-09-05 21:33:08 +00:00
|
|
|
.onoffswitch {
|
|
|
|
position: relative;
|
|
|
|
margin: 1ex 0;
|
|
|
|
-webkit-user-select: none;
|
|
|
|
-moz-user-select: none;
|
|
|
|
-ms-user-select: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.onoffswitch input {
|
2017-12-09 07:03:18 +00:00
|
|
|
-webkit-appearance: none;
|
|
|
|
-moz-appearance: none;
|
|
|
|
pointer-events: none;
|
|
|
|
position: absolute;
|
|
|
|
top: -8px;
|
|
|
|
bottom: -10px;
|
|
|
|
left: -10px;
|
|
|
|
width: calc(100% + 12px);
|
|
|
|
}
|
|
|
|
|
|
|
|
#message-box .onoffswitch input {
|
|
|
|
top: -6px;
|
|
|
|
left: -6px;
|
|
|
|
bottom: 0;
|
|
|
|
height: calc(100% + 12px);
|
2017-09-05 21:33:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.onoffswitch span {
|
|
|
|
display: block;
|
|
|
|
overflow: hidden;
|
|
|
|
cursor: pointer;
|
|
|
|
height: 12px;
|
|
|
|
padding: 0;
|
|
|
|
line-height: 12px;
|
2018-10-12 20:30:33 +00:00
|
|
|
border: 1px solid var(--gray-lightness-84);
|
2017-09-05 21:33:08 +00:00
|
|
|
border-radius: 12px;
|
2018-10-12 20:30:33 +00:00
|
|
|
background-color: var(--gray-lightness-87);
|
|
|
|
box-shadow: inset 2px 2px 4px var(--black-alpha-15);
|
2017-09-05 21:33:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.onoffswitch span::before {
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
width: 18px;
|
|
|
|
height: 18px;
|
|
|
|
margin: -3px;
|
2018-10-12 20:30:33 +00:00
|
|
|
background: var(--gray-lightness-92);
|
2017-09-05 21:33:08 +00:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 46px;
|
|
|
|
border-radius: 18px;
|
2018-10-12 20:30:33 +00:00
|
|
|
box-shadow: 0 3px 13px 0 var(--black-alpha-45);
|
2017-09-05 21:33:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.onoffswitch input:checked + span {
|
2018-10-12 20:30:33 +00:00
|
|
|
background-color: var(--slider-enabled-bg);
|
2017-09-05 21:33:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.onoffswitch input:checked + span, .onoffswitch input:checked + span::before {
|
2018-10-12 20:30:33 +00:00
|
|
|
border-color: var(--slider-enabled-border);
|
2017-09-05 21:33:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.onoffswitch input:checked + span .onoffswitch-inner {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.onoffswitch input:checked + span::before {
|
|
|
|
right: 0;
|
|
|
|
background-color: #04BA9F;
|
2018-10-12 20:30:33 +00:00
|
|
|
box-shadow: 3px 6px 18px 0 var(--black-alpha-25);
|
2017-09-05 21:33:08 +00:00
|
|
|
}
|