|
11 | 11 | --border: 1px solid var(--border-color); |
12 | 12 | } |
13 | 13 |
|
14 | | -/* Light theme */ |
15 | | -/* stylelint-disable-next-line no-duplicate-selectors */ |
16 | | -:root { |
| 14 | +@define-mixin light-theme-vars { |
17 | 15 | --positive-luminance: white; |
18 | 16 | --negative-luminance: black; |
19 | 17 |
|
|
107 | 105 | --output-current-tab: #f9ffff; |
108 | 106 | } |
109 | 107 |
|
110 | | -/* Automatic dark mode */ |
111 | | -@media (prefers-color-scheme: dark) { |
112 | | - :root { |
113 | | - --positive-luminance: black; |
114 | | - --negative-luminance: white; |
| 108 | +@define-mixin dark-theme-vars { |
| 109 | + --positive-luminance: black; |
| 110 | + --negative-luminance: white; |
115 | 111 |
|
116 | | - /* Fonts */ |
117 | | - --font-color: #b4aea6; |
118 | | - --font-color-high-contrast: #dcdbd8; |
| 112 | + /* Fonts */ |
| 113 | + --font-color: #b4aea6; |
| 114 | + --font-color-high-contrast: #dcdbd8; |
119 | 115 |
|
120 | | - /* Links */ |
121 | | - --link-color: #308af2; |
122 | | - --link-color-visited: #9f5fe1; |
| 116 | + /* Links */ |
| 117 | + --link-color: #308af2; |
| 118 | + --link-color-visited: #9f5fe1; |
123 | 119 |
|
124 | | - /* Background */ |
125 | | - --background-color: #292c2e; |
126 | | - --background-color-high-contrast: #17191a; |
| 120 | + /* Background */ |
| 121 | + --background-color: #292c2e; |
| 122 | + --background-color-high-contrast: #17191a; |
127 | 123 |
|
128 | | - /* Code */ |
129 | | - --code-background-color: #3c3c3c; |
| 124 | + /* Code */ |
| 125 | + --code-background-color: #3c3c3c; |
130 | 126 |
|
131 | | - /* Border */ |
132 | | - --border-color: #404548; |
| 127 | + /* Border */ |
| 128 | + --border-color: #404548; |
133 | 129 |
|
134 | | - /* Header */ |
135 | | - --header-main-border: #363b3d; |
136 | | - --header-accent-border: #bdbdbd; |
| 130 | + /* Header */ |
| 131 | + --header-main-border: #363b3d; |
| 132 | + --header-accent-border: #bdbdbd; |
137 | 133 |
|
138 | | - /* The big red button */ |
139 | | - --button-primary-color: #dcdbd8; |
140 | | - --button-primary-bg-color: #81331a; |
141 | | - --button-primary-border-color: #612714; |
| 134 | + /* The big red button */ |
| 135 | + --button-primary-color: #dcdbd8; |
| 136 | + --button-primary-bg-color: #81331a; |
| 137 | + --button-primary-border-color: #612714; |
142 | 138 |
|
143 | | - /* Not the big red button */ |
144 | | - --button-secondary-color: #b4aea6; |
145 | | - --button-secondary-bg-color-top: #17191a; |
146 | | - --button-secondary-bg-color-bottom: #1a1c1d; |
| 139 | + /* Not the big red button */ |
| 140 | + --button-secondary-color: #b4aea6; |
| 141 | + --button-secondary-bg-color-top: #17191a; |
| 142 | + --button-secondary-bg-color-bottom: #1a1c1d; |
| 143 | + |
| 144 | + /* Output tabs */ |
| 145 | + --output-background-tab: #191b1c; |
| 146 | + --output-current-tab: #343434; |
| 147 | +} |
| 148 | + |
| 149 | +:root, |
| 150 | +[data-theme='light']:root { |
| 151 | + @mixin light-theme-vars; |
| 152 | +} |
147 | 153 |
|
148 | | - /* Output tabs */ |
149 | | - --output-background-tab: #191b1c; |
150 | | - --output-current-tab: #343434; |
| 154 | +@media (prefers-color-scheme: dark) { |
| 155 | + :root { |
| 156 | + @mixin dark-theme-vars; |
151 | 157 | } |
152 | 158 | } |
153 | 159 |
|
| 160 | +[data-theme='dark']:root { |
| 161 | + @mixin dark-theme-vars; |
| 162 | +} |
| 163 | + |
154 | 164 | /* Modify normalized styles */ |
155 | 165 | button, |
156 | 166 | input, |
|
0 commit comments