summaryrefslogtreecommitdiff
path: root/src/components/shared/ThemeSwitcher.module.scss
blob: c5de1261df06e00daad0fde049ae013c602557eb (plain)
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
.iconWrapper {
  --sz: 40px;

  width: var(--sz);
  height: var(--sz);
  display: flex;
  justify-content: center;
  align-items: center;

  outline: none;
  padding: 5px;
  color: var(--color-text);
  border-radius: 100%;
  border: 1px solid transparent;
}
.iconWrapper:hover {
  opacity: 0.6;
}
.iconWrapper:focus {
  border-color: var(--color-focus-blue);
}

.themeSwitchContainer {
  --sz: 40px;

  position: relative;
  display: flex;
  align-items: center;
  height: var(--sz);
  select {
    cursor: pointer;
    padding-left: var(--sz);
    width: var(--sz);
    height: var(--sz);
    appearance: none;
    outline: none;
    border-radius: 100%;
    border: 1px solid transparent;
    background: var(--color-bg-sidebar);
    &:focus {
      border-color: var(--color-focus-blue);
    }
    option {
      // this has effect in Firefox
      // Chrome and Safari use the native menu
      background: var(--color-bg-sidebar);
    }
  }
  .iconWrapper {
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 0;
  }
}