|
1 |
| -@use '../share/mixin' as mixin; |
2 |
| -@use '../share/theme' as theme; |
| 1 | +@use '../share/mixin' as *; |
| 2 | +@use '../share/theme' as *; |
3 | 3 |
|
4 | 4 | .luna-setting {
|
5 | 5 | min-width: 320px;
|
6 |
| - @include mixin.component(); |
| 6 | + @include component(true); |
7 | 7 | }
|
8 | 8 |
|
9 | 9 | .item {
|
10 |
| - &:hover, |
11 |
| - &.selected { |
12 |
| - background: theme.$color-fill-secondary; |
13 |
| - } |
14 | 10 | &.selected:focus {
|
15 |
| - outline: 1px solid theme.$color-primary; |
| 11 | + outline: 1px solid; |
16 | 12 | }
|
17 | 13 | .title {
|
18 | 14 | line-height: 1.4em;
|
|
29 | 25 | }
|
30 | 26 | a {
|
31 | 27 | background-color: transparent;
|
32 |
| - color: #0969da; |
33 | 28 | text-decoration: none;
|
34 | 29 | }
|
35 | 30 | }
|
36 | 31 | .description,
|
37 | 32 | .control {
|
38 |
| - font-size: #{theme.$font-size-s-m}px; |
| 33 | + font-size: #{$font-size-s-m}px; |
39 | 34 | }
|
40 | 35 | .description {
|
41 | 36 | margin-bottom: 8px;
|
|
76 | 71 | }
|
77 | 72 | }
|
78 | 73 | input {
|
79 |
| - @include mixin.input(); |
| 74 | + @include input(); |
80 | 75 | width: 100%;
|
81 | 76 | }
|
82 | 77 | }
|
|
92 | 87 | }
|
93 | 88 | }
|
94 | 89 | input[type='number'] {
|
95 |
| - @include mixin.input(); |
| 90 | + @include input(); |
96 | 91 | width: 200px;
|
97 | 92 | padding: 2px;
|
98 | 93 | }
|
|
108 | 103 | left: 0;
|
109 | 104 | top: 4px;
|
110 | 105 | .range-track-bar {
|
111 |
| - background: theme.$color-border; |
112 | 106 | border-radius: 2px;
|
113 | 107 | overflow: hidden;
|
114 | 108 | width: 100%;
|
115 | 109 | height: 4px;
|
116 | 110 | .range-track-progress {
|
117 | 111 | height: 100%;
|
118 |
| - background: theme.$color-primary; |
119 | 112 | width: 50%;
|
120 | 113 | }
|
121 | 114 | }
|
|
140 | 133 | border: none;
|
141 | 134 | height: 16px;
|
142 | 135 | border-radius: 10px;
|
143 |
| - border: 1px solid theme.$color-border; |
144 |
| - background: radial-gradient( |
145 |
| - circle at center, |
146 |
| - #eee 0, |
147 |
| - #eee 15%, |
148 |
| - #fff 22%, |
149 |
| - #fff 100% |
150 |
| - ); |
| 136 | + border: 1px solid; |
151 | 137 | }
|
152 | 138 | }
|
153 | 139 | }
|
|
159 | 145 | }
|
160 | 146 | }
|
161 | 147 | input {
|
162 |
| - @include mixin.checkbox(); |
| 148 | + @include checkbox(); |
163 | 149 | align-self: flex-start;
|
164 | 150 | flex-shrink: 0;
|
165 | 151 | }
|
|
178 | 164 | }
|
179 | 165 | }
|
180 | 166 | .select {
|
181 |
| - @include mixin.select(); |
| 167 | + @include select(); |
182 | 168 | select {
|
183 | 169 | width: 300px;
|
184 | 170 | }
|
|
187 | 173 |
|
188 | 174 | .item-button {
|
189 | 175 | button {
|
190 |
| - @include mixin.button(); |
| 176 | + @include button(); |
191 | 177 | }
|
192 | 178 | }
|
193 | 179 |
|
194 | 180 | .item-separator {
|
195 |
| - border-bottom: 1px solid theme.$color-border; |
| 181 | + border-bottom: 1px solid; |
196 | 182 | }
|
197 | 183 |
|
198 |
| -.theme-dark { |
199 |
| - .item { |
200 |
| - &:hover, |
201 |
| - &.selected { |
202 |
| - background: theme.$color-fill-secondary-dark; |
203 |
| - } |
204 |
| - .description { |
205 |
| - a { |
206 |
| - background-color: transparent; |
207 |
| - color: #58a6ff; |
| 184 | +@each $theme in ('light', 'dark') { |
| 185 | + .theme-#{$theme} { |
| 186 | + .item { |
| 187 | + &:hover, |
| 188 | + &.selected { |
| 189 | + @include theme-var(background-color, color-fill-secondary, $theme); |
| 190 | + } |
| 191 | + &.selected:focus { |
| 192 | + @include theme-var(outline-color, color-primary, $theme); |
| 193 | + } |
| 194 | + .description, |
| 195 | + &.item-markdown { |
| 196 | + a { |
| 197 | + @include theme-var(color, color-primary, $theme); |
| 198 | + } |
208 | 199 | }
|
209 | 200 | }
|
210 |
| - } |
211 |
| - .item-separator { |
212 |
| - border-color: theme.$color-border-dark; |
213 |
| - } |
214 |
| - .item-input { |
215 |
| - input { |
216 |
| - @include mixin.input(true); |
| 201 | + .item-separator { |
| 202 | + @include theme-var(border-color, color-border, $theme); |
217 | 203 | }
|
218 |
| - } |
219 |
| - .item-checkbox { |
220 |
| - input { |
221 |
| - @include mixin.checkbox(true); |
| 204 | + .item-input { |
| 205 | + input { |
| 206 | + @include input-theme($theme); |
| 207 | + } |
222 | 208 | }
|
223 |
| - } |
224 |
| - .item-select { |
225 |
| - .select { |
226 |
| - @include mixin.select(true); |
| 209 | + .item-checkbox { |
| 210 | + input { |
| 211 | + @include checkbox-theme($theme); |
| 212 | + } |
227 | 213 | }
|
228 |
| - } |
229 |
| - .item-button { |
230 |
| - button { |
231 |
| - @include mixin.button(true); |
| 214 | + .item-select { |
| 215 | + .select { |
| 216 | + @include select-theme($theme); |
| 217 | + } |
232 | 218 | }
|
233 |
| - } |
234 |
| - .item-number { |
235 |
| - input[type='number'] { |
236 |
| - @include mixin.input(true); |
| 219 | + .item-button { |
| 220 | + button { |
| 221 | + @include button-theme($theme); |
| 222 | + } |
237 | 223 | }
|
238 |
| - .range-container { |
239 |
| - .range-track { |
240 |
| - .range-track-bar { |
241 |
| - background: theme.$color-border-dark; |
242 |
| - } |
| 224 | + .item-number { |
| 225 | + input[type='number'] { |
| 226 | + @include input-theme($theme); |
243 | 227 | }
|
244 |
| - input::-webkit-slider-thumb { |
245 |
| - border-color: theme.$color-border-dark; |
246 |
| - background: radial-gradient( |
247 |
| - circle at center, |
248 |
| - #aaa 0, |
249 |
| - #aaa 15%, |
250 |
| - #ccc 22%, |
251 |
| - #ccc 100% |
252 |
| - ); |
| 228 | + .range-container { |
| 229 | + .range-track { |
| 230 | + .range-track-bar { |
| 231 | + @include theme-var(background-color, color-border, $theme); |
| 232 | + .range-track-progress { |
| 233 | + @include theme-var(background-color, color-primary, $theme); |
| 234 | + } |
| 235 | + } |
| 236 | + } |
| 237 | + input::-webkit-slider-thumb { |
| 238 | + @include theme-var(border-color, color-border, $theme); |
| 239 | + @if ($theme == 'light') { |
| 240 | + background: radial-gradient( |
| 241 | + circle at center, |
| 242 | + #eee 0, |
| 243 | + #eee 15%, |
| 244 | + #fff 22%, |
| 245 | + #fff 100% |
| 246 | + ); |
| 247 | + } @else { |
| 248 | + background: radial-gradient( |
| 249 | + circle at center, |
| 250 | + #aaa 0, |
| 251 | + #aaa 15%, |
| 252 | + #ccc 22%, |
| 253 | + #ccc 100% |
| 254 | + ); |
| 255 | + } |
| 256 | + } |
253 | 257 | }
|
254 | 258 | }
|
255 | 259 | }
|
|
0 commit comments