save: public switch

This commit is contained in:
muerwre 2018-12-18 12:19:02 +07:00
parent a1bb4da475
commit 69f23c9e48
6 changed files with 83 additions and 10 deletions

33
src/styles/switch.less Normal file
View file

@ -0,0 +1,33 @@
.switch {
height: 1em;
width: 2em;
border-radius: 0.5em;
box-shadow: inset white 0 0 0 0.1em;
display: inline-flex;
vertical-align: text-top;
position: relative;
top: 0.05em;
margin-right: 0.5em;
transition: all 500ms;
&::after {
content: ' ';
position: absolute;
left: 0.2em;
top: 0.2em;
width: 0.6em;
height: 0.6em;
border-radius: 0.3em;
background: white;
transition: all 500ms;
}
&.active {
background: white;
&::after {
left: 1.2em;
background: #333333;
}
}
}