-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
182 lines (148 loc) · 3.27 KB
/
styles.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
.main-div{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
}
.main-text {
font-size: 30px;
text-align: center;
font-weight: bold;
border-radius: 10px;
padding:10px;
}
/* ---------------------------------------------------- */
/* Toggle style */
/* ---------------------------------------------------- */
/* small screens --- starts*/
.switch {
position: fixed;
top: 52px;
right: 20px;
display: inline-block;
width: 35px;
height: 20px;
z-index: 1000;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 0px;
bottom: 0px;
border-radius: 50%;
transition: .4s;
}
input:checked + .slider:before {
transform: translateX(15px);
}
/* small screens --- ends*/
/* big screens, ipad included --- starts*/
@media (min-width: 768px) {
.switch {
top: 20px;
right: 20px;
width: 60px;
height: 34px;
}
.slider:before {
height: 28px;
width: 28px;
left: 4px;
bottom:2px
}
input:checked + .slider:before {
transform: translateX(26px);
}
}
/* big screens, ipad included --- ends*/
/* ---------------------------------------------------- */
/* light mode look : add "body.light-mode" to your style*/
/* ---------------------------------------------------- */
/* toggle style in light mode --- starts */
body.light-mode .slider {
background-color: lightgray;
border: 1px solid grey;
}
body.light-mode input:checked + .slider {
background-color: lightgray;
border: 1px solid grey;
}
body.light-mode .slider:before {
background-color: white;
}
/* toggle style in light mode --- ends */
/* body style in light mode */
body.light-mode {
background-color: #f2f2f7;
color: black;
}
/* arrow head style in light mode */
body.light-mode #arrowheadPolygon
{
fill: rgb(196, 196, 196);
}
/* arrow path style in light mode */
body.light-mode #arrow
{
stroke: rgb(196, 196, 196);
}
/* text "toggle this" style in light mode */
body.light-mode .main-text {
border: 2px solid rgb(196, 196, 196);
}
/* ---------------------------------------------------- */
/* Dark mode look : add "body.dark-mode" to your style*/
/* ---------------------------------------------------- */
/* toggle style in dark mode --- starts */
body.dark-mode .slider {
background-color: #222224;
border: 1px solid grey;
}
body.dark-mode input:checked + .slider {
background-color: #222224;
border: 1px solid grey;
}
body.dark-mode .slider:before {
background-color: teal;
}
/* toggle style in dark mode --- ends */
/* body style in dark mode */
body.dark-mode {
background-color: #1c1c1e;
color: lightgrey;
}
/* arrow head style in dark mode */
body.dark-mode #arrowheadPolygon
{
fill: rgb(152, 119, 1);
}
/* arrow path style in dark mode */
body.dark-mode #arrow
{
stroke: rgb(152, 119, 1);
}
/* text "toggle this" style in dark mode */
body.dark-mode .main-text {
border: 2px solid rgb(152, 119, 1);
}