Jacky Zhao
2025-05-28 096ef220dc469ca81a5514d48bb8b8d48284990c
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
.darkmode {
  cursor: pointer;
  padding: 0;
  position: relative;
  background: none;
  border: none;
  width: 20px;
  height: 20px;
  margin: 0;
  text-align: inherit;
  flex-shrink: 0;
 
  & svg {
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    fill: var(--darkgray);
    transition: opacity 0.1s ease;
  }
}
 
:root[saved-theme="dark"] {
  color-scheme: dark;
}
 
:root[saved-theme="light"] {
  color-scheme: light;
}
 
:root[saved-theme="dark"] .darkmode {
  & > .dayIcon {
    display: none;
  }
  & > .nightIcon {
    display: inline;
  }
}
 
:root .darkmode {
  & > .dayIcon {
    display: inline;
  }
  & > .nightIcon {
    display: none;
  }
}