File size: 1,044 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
.switch {
  all: unset;
  position: absolute;
  right: 20px;
  top: 70px;
  display: inline-block;
  color: currentColor;
  border-radius: 50%;
  border: 1px dashed currentColor;
  cursor: pointer;
  --size: 24px;
  height: var(--size);
  width: var(--size);
  transition: all 0.3s ease-in-out 0s !important;
}

[data-mode="system"] .switch::after {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  font-weight: 600;
  font-size: calc(var(--size) / 2);
  display: flex;
  align-items: center;
  justify-content: center;
  content: "A";
}

[data-mode="light"] .switch {
  box-shadow: 0 0 50px 10px yellow;
  background-color: yellow;
  border: 1px solid orangered;
}

[data-mode="dark"] .switch {
  box-shadow: calc(var(--size) / 4) calc(var(--size) / -4) calc(var(--size) / 8)
    inset #fff;
  border: none;
  background: transparent;
  animation: n linear 0.5s;
}

@keyframes n {
  40% {
    transform: rotate(-15deg);
  }
  80% {
    transform: rotate(10deg);
  }
  0%,
  100% {
    transform: rotate(0deg);
  }
}