-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.css
125 lines (125 loc) · 2.38 KB
/
main.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@import url('https://fonts.googleapis.com/css?family=Chakra+Petch:600');
body , html{
padding: 0;
background: #262626;
font-family: 'Chakra Petch', sans-serif;
}
*,*:before,*after{
box-sizing: inherit;
margin:0;
padding: 0;
}
.mid{
display: flex;
align-items: center;
justify-content: center;
height: 85vh;
}
.rocker{
display: inline-block;
position: relative;
font-size: 2em;
font-weight: bold;
text-align: center;
color: #888;
width: 7em;
height: 4em;
overflow: hidden;
border-bottom: 0.5em solid #eee;
}
.rocker::before{
content: "";
position: absolute;
top:1em;
left: 0;
right: 0;
bottom: 0;
background: #999;
border: 0.5em solid #eee;
border-bottom: 0;
}
.rocker input{
-webkit-appearance:none;
width: 0;
height: 0;
}
.switch-left,
.switch-right{
cursor: pointer;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
height: 2.5em;
width: 3em;
transition: .2s;
}
.switch-left{
height: 2.4em;
width: 2.75em;
left: 0.85em;
bottom: 0.4em;
background: #ddd;
transform: rotate(15deg) skewX(15deg);
}
.switch-right{
right: 0.5em;
bottom: 0;
background: #bd5757;
color: #fff;
}
.switch-left::before,
.switch-right::before{
content: "";
position: absolute;
width: 0.4em;
height: 2.45em;
bottom: -0.45em;
background: #ccc;
transform: skewY(-65deg);
}
.switch-left::before {
left: -0.4em;
}
.switch-right::before {
right: -0.375em;
background-color: transparent;
transform: skewY(65deg);
}
input:checked + .switch-left{
background: #0084d0;
color: #fff;
bottom: 0px;
left:0.5em;
height: 2.5em;
width: 3em;
transform: rotate(0deg) skewX(0deg);
}
input:checked + .switch-left::before {
background-color: transparent;
width: 3.0833em;
}
input:checked + .switch-left + .switch-right {
background-color: #ddd;
color: #888;
bottom: 0.4em;
right: 0.8em;
height: 2.4em;
width: 2.75em;
transform: rotate(-15deg) skewX(-15deg);
}
input:checked + .switch-left + .switch-right::before {
background-color: #ccc;
}
input:focus + .switch-left {
color: #333;
}
input:checked:focus + .switch-left {
color: #fff;
}
input:focus + .switch-left + .switch-right {
color: #fff;
}
input:checked:focus + .switch-left + .switch-right {
color: #333;
}