-
Notifications
You must be signed in to change notification settings - Fork 0
/
toggle.css
139 lines (115 loc) · 2.58 KB
/
toggle.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*switch styles*/
div.btn-container{
display: table-cell;
vertical-align: middle;
text-align: center;
}
div.btn-container i{
display: inline-block;
position: relative;
top: -9px;
}
label {
font-size: 13px;
color: #424242;
font-weight: 500;
}
.btn-color-mode-switch{
display: inline-block;
margin: 0px;
position: relative;
}
.btn-color-mode-switch > label.btn-color-mode-switch-inner{
margin: 0px;
width: 140px;
height: 30px;
background: #E0E0E0;
border-radius: 26px;
overflow: hidden;
position: relative;
transition: all 0.3s ease;
/*box-shadow: 0px 0px 8px 0px rgba(17, 17, 17, 0.34) inset;*/
display: block;
}
.btn-color-mode-switch > label.btn-color-mode-switch-inner:before{
content: attr(data-on);
position: absolute;
font-size: 12px;
font-weight: 500;
top: 7px;
right: 20px;
}
.btn-color-mode-switch > label.btn-color-mode-switch-inner:after{
content: attr(data-off);
width: 70px;
height: 16px;
background: #fff;
border-radius: 26px;
position: absolute;
left: 2px;
top: 2px;
text-align: center;
transition: all 0.3s ease;
box-shadow: 0px 0px 6px -2px #111;
padding: 5px 0px;
}
.btn-color-mode-switch > .alert{
display: none;
background: #FF9800;
border: none;
color: #fff;
}
.btn-color-mode-switch input[type="checkbox"]{
cursor: pointer;
width: 50px;
height: 25px;
opacity: 0;
position: absolute;
top: 0;
z-index: 1;
margin: 0px;
}
.btn-color-mode-switch input[type="checkbox"]:checked + label.btn-color-mode-switch-inner{
background: #151515;
color: #fff;
}
.btn-color-mode-switch input[type="checkbox"]:checked + label.btn-color-mode-switch-inner:after{
content: attr(data-on);
left: 68px;
background: #3c3c3c;
}
.btn-color-mode-switch input[type="checkbox"]:checked + label.btn-color-mode-switch-inner:before{
content: attr(data-off);
right: auto;
left: 20px;
}
.btn-color-mode-switch input[type="checkbox"]:checked ~ .alert{
display: block;
}
/*mode preview*/
.dark-preview{
background: #0d0d0d;
}
.dark-preview div.btn-container i.fa-sun-o{
color: #777;
}
.dark-preview div.btn-container i.fa-moon-o{
color: #fff;
text-shadow: 0px 0px 11px #fff;
}
.white-preview{
background: #fff;
}
.white-preview div.btn-container i.fa-sun-o{
color: #ffa500;
text-shadow: 0px 0px 16px #ffa500;
}
.white-preview div.btn-container i.fa-moon-o{
color: #777;
}
.dark-preview p.by a{
color: #777;
}
.white-preview p.by a{
color: #000;
}