|
1 | | -:root { |
2 | | - --background: #fff; |
3 | | - --font-color: #494949; |
| 1 | +.tree-menu { |
| 2 | + --font-family: "Avenir Next", Helvetica, Arial, sans-serif; |
| 3 | +} |
| 4 | +@media (prefers-color-scheme: light) { |
| 5 | + .tree-menu { |
| 6 | + --tree-background: #ffffff; |
| 7 | + --item-title: rgba(31, 31, 31, 0.787); |
| 8 | + --item-info: #79aaff; |
| 9 | + --item-group-icon: red; |
| 10 | + --item-selected-background: rgba(129, 129, 129, 0.364); |
| 11 | + --item-selected-color: #202020; |
| 12 | + --item-hover-background: rgba(0, 0, 0, 0.063); |
| 13 | + --item-hover-color: #000000; |
| 14 | + --item-disabled-color: rgba(129, 129, 129, 0.533); |
| 15 | + } |
4 | 16 | } |
5 | 17 | @media (prefers-color-scheme: dark) { |
6 | | - :root { |
7 | | - --background: #3c3c3c; |
8 | | - --font-color: #fafafa; |
| 18 | + .tree-menu { |
| 19 | + --tree-background: #242539; |
| 20 | + --item-title: rgba(225, 225, 225, 0.787); |
| 21 | + --item-info: #c8a636; |
| 22 | + --item-group-icon: red; |
| 23 | + --item-selected-background: rgba(148, 185, 247, 0.364); |
| 24 | + --item-selected-color: #ffffff; |
| 25 | + --item-hover-background: rgba(89, 100, 102, 0.692); |
| 26 | + --item-hover-color: #04c5ff; |
| 27 | + --item-disabled-color: rgba(129, 129, 129, 0.533); |
9 | 28 | } |
10 | 29 | } |
| 30 | +.dark .tree-menu { |
| 31 | + --tree-background: #242539; |
| 32 | + --item-title: rgba(225, 225, 225, 0.787); |
| 33 | + --item-info: #c8a636; |
| 34 | + --item-group-icon: red; |
| 35 | + --item-selected-background: rgba(148, 185, 247, 0.364); |
| 36 | + --item-selected-color: #ffffff; |
| 37 | + --item-hover-background: rgba(89, 100, 102, 0.692); |
| 38 | + --item-hover-color: #04c5ff; |
| 39 | + --item-disabled-color: rgba(129, 129, 129, 0.533); |
| 40 | +} |
| 41 | +.light .tree-menu { |
| 42 | + --tree-background: #ffffff; |
| 43 | + --item-title: rgba(31, 31, 31, 0.787); |
| 44 | + --item-info: #79aaff; |
| 45 | + --item-group-icon: red; |
| 46 | + --item-selected-background: rgba(129, 129, 129, 0.364); |
| 47 | + --item-selected-color: #202020; |
| 48 | + --item-hover-background: rgba(0, 0, 0, 0.063); |
| 49 | + --item-hover-color: #000000; |
| 50 | + --item-disabled-color: rgba(129, 129, 129, 0.533); |
| 51 | +} |
11 | 52 | .heading { |
12 | 53 | font-family: "Avenir Next", Helvetica, Arial, sans-serif; |
13 | 54 | font-size: 40px; |
14 | 55 | font-weight: bold; |
15 | 56 | } |
16 | 57 | .tree-menu { |
| 58 | + background-color: var(--tree-background); |
| 59 | + font-family: var(--font-family); |
17 | 60 | -webkit-touch-callout: none; |
18 | 61 | /* iOS Safari */ |
19 | 62 | -webkit-user-select: none; |
|
37 | 80 | .tree-menu .item { |
38 | 81 | cursor: pointer; |
39 | 82 | transition: all 0.3s ease-in; |
| 83 | + color: var(--item-title); |
40 | 84 | } |
41 | 85 | .tree-menu .item.disabled { |
42 | 86 | pointer-events: none; |
43 | | - color: #6e6e6e; |
| 87 | + color: var(--item-disabled-color); |
44 | 88 | } |
45 | 89 | .tree-menu .item:hover { |
46 | | - color: #3eaee6; |
47 | | - background-color: #3c3f4c; |
| 90 | + color: var(--item-hover-color); |
| 91 | + background-color: var(--item-hover-background); |
48 | 92 | transition: all 0.3s ease-in; |
49 | 93 | opacity: 1; |
50 | 94 | } |
|
57 | 101 | } |
58 | 102 | .tree-menu .item ~ .group.disabled { |
59 | 103 | pointer-events: none; |
60 | | - color: #6e6e6e; |
| 104 | + color: var(--item-disabled-color); |
61 | 105 | } |
62 | 106 | .tree-menu .item.collapsed ~ .group { |
63 | 107 | max-height: 0px; |
|
72 | 116 | flex-direction: row; |
73 | 117 | align-items: center; |
74 | 118 | } |
| 119 | +.tree-menu .item > .content:hover { |
| 120 | + color: var(--item-hover-color); |
| 121 | +} |
75 | 122 | .tree-menu .item > .content > .icon { |
76 | 123 | display: flex; |
77 | 124 | padding-right: 5px; |
|
83 | 130 | } |
84 | 131 | .tree-menu .item > .content > .title > .info { |
85 | 132 | font-size: 0.7em; |
86 | | - color: orange; |
| 133 | + color: var(--item-info); |
87 | 134 | } |
88 | 135 | .tree-menu .selected { |
89 | | - background-color: #363b50; |
90 | | -} |
91 | | -.test.tree-menu { |
92 | | - background-color: black; |
| 136 | + background-color: var(--item-selected-background); |
| 137 | + color: var(--item-selected-color) !important; |
93 | 138 | } |
0 commit comments