-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlab.css
94 lines (79 loc) · 1.55 KB
/
lab.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
:root {
--white: #f0f0f0;
--light-grey: #e4e4e4;
--black: #111111;
--dark-grey: #272727;
--bg: var(--white);
--txt: var(--black);
--dark-opacity: 0;
--light-opacity: 1;
}
/* ^Required for Dark Mode Toggle code^ */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/** Dark/Light Toggle code start: **/
.content {
background-color: var(--bg);
color: var(--txt);
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
transition: background 0.3s ease 0s;
}
.toggle {
bottom: 25vh;
right: 10vw;
}
.checkbox {
display: none;
}
.label {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
background: var(--txt);
border-radius: 5rem;
padding: 0.5rem;
height: 2.5rem;
width: 5rem;
font-size: 1.5rem;
transition: background 0.5s ease 0s;
cursor: pointer;
z-index: 1;
}
.label .ball {
position: absolute;
background-color: var(--bg);
border-radius: 50%;
top: 0.25rem;
left: 0.25rem;
height: 2rem;
width: 2rem;
transform: translateX(0);
transition: transform 0.3s ease, background-color 0.5s ease;
}
.checkbox:checked+.content .label .ball {
transform: translateX(2.5rem);
}
.checkbox:checked+.content {
--bg: var(--black);
--txt: var(--white);
--dark-opacity: 1;
--light-opacity: 0;
}
/** Dark/Light Toggle code end. **/
/* Main part start: */
.body {
background: var(--bg);
color: var(--txt);
font-family: "Segoe UI Variable Display", Verdana, sans-serif;
}
.title {
font-size: 1.5rem;
font-weight: 400;
}