|
19 | 19 | max-width: 100%;
|
20 | 20 | box-shadow: theme.$box-shadow;
|
21 | 21 | font-size: 12px;
|
22 |
| - background: theme.$color-bg-container; |
23 | 22 | }
|
24 | 23 |
|
25 | 24 | .input {
|
26 | 25 | box-sizing: border-box;
|
27 | 26 | outline: none;
|
28 | 27 | width: 100%;
|
29 | 28 | border: none;
|
30 |
| - border-bottom: 1px solid theme.$color-border; |
| 29 | + border-bottom: 1px solid; |
31 | 30 | padding: 10px 4px;
|
32 |
| - color: theme.$color-text; |
33 | 31 | }
|
34 | 32 |
|
35 | 33 | .list {
|
|
42 | 40 | padding: 5px;
|
43 | 41 | cursor: pointer;
|
44 | 42 | display: flex;
|
45 |
| - &:hover { |
46 |
| - background: theme.$color-fill-secondary; |
47 |
| - } |
48 |
| - &.active { |
49 |
| - color: theme.$color-white; |
50 |
| - background: theme.$color-primary; |
51 |
| - } |
52 | 43 | .title {
|
53 | 44 | flex: 1;
|
54 | 45 | overflow: hidden;
|
|
60 | 51 | display: none;
|
61 | 52 | }
|
62 | 53 |
|
63 |
| -.theme-dark { |
64 |
| - .body { |
65 |
| - background: theme.$color-bg-container-dark; |
66 |
| - } |
67 |
| - .input { |
68 |
| - background: theme.$color-bg-container-dark; |
69 |
| - border-color: theme.$color-border-dark; |
70 |
| - color: theme.$color-text-dark; |
71 |
| - } |
72 |
| - li { |
73 |
| - &:hover { |
74 |
| - background: theme.$color-fill-secondary-dark; |
| 54 | +$themes: 'light', 'dark'; |
| 55 | +@each $theme in $themes { |
| 56 | + .theme-#{$theme} { |
| 57 | + .body { |
| 58 | + @include mixin.theme-rule(background-color, color-bg-container, $theme); |
| 59 | + } |
| 60 | + |
| 61 | + .input { |
| 62 | + @include mixin.theme-rule(background-color, color-bg-container, $theme); |
| 63 | + @include mixin.theme-rule(border-color, color-border, $theme); |
| 64 | + @include mixin.theme-rule(color, color-text, $theme); |
75 | 65 | }
|
76 |
| - &.active { |
77 |
| - color: theme.$color-white; |
78 |
| - background: theme.$color-primary; |
| 66 | + |
| 67 | + .list { |
| 68 | + li { |
| 69 | + &:hover { |
| 70 | + @include mixin.theme-rule( |
| 71 | + background-color, |
| 72 | + color-fill-secondary, |
| 73 | + $theme |
| 74 | + ); |
| 75 | + } |
| 76 | + &.active { |
| 77 | + @include mixin.theme-rule(color, color-white, $theme); |
| 78 | + @include mixin.theme-rule(background-color, color-primary, $theme); |
| 79 | + } |
| 80 | + } |
79 | 81 | }
|
80 | 82 | }
|
81 | 83 | }
|
0 commit comments