|
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-modal {
|
5 | 5 | position: fixed;
|
|
10 | 10 | display: flex;
|
11 | 11 | justify-content: center;
|
12 | 12 | align-items: center;
|
13 |
| - @include mixin.component(); |
| 13 | + @include component(); |
14 | 14 | & {
|
15 | 15 | background: rgba(0, 0, 0, 0.5);
|
16 | 16 | }
|
|
26 | 26 |
|
27 | 27 | .body {
|
28 | 28 | position: relative;
|
29 |
| - background: theme.$color-bg-container; |
30 | 29 | max-height: 100%;
|
31 | 30 | display: flex;
|
32 | 31 | flex-direction: column;
|
33 | 32 | border-radius: 4px;
|
| 33 | + border: 1px solid; |
34 | 34 | &.no-title {
|
35 | 35 | position: static;
|
36 | 36 | .title {
|
|
81 | 81 |
|
82 | 82 | .button {
|
83 | 83 | padding: 0 12px;
|
84 |
| - background: #e9ecef; |
85 | 84 | cursor: default;
|
86 | 85 | position: relative;
|
87 | 86 | user-select: none;
|
88 | 87 | margin: 0 4px;
|
89 |
| - font-size: #{theme.$font-size-s-m}px; |
| 88 | + font-size: #{$font-size-s-m}px; |
90 | 89 | border-radius: 4px;
|
91 | 90 | overflow: hidden;
|
92 | 91 | height: 28px;
|
93 | 92 | line-height: 28px;
|
94 | 93 | &:active {
|
95 | 94 | &::before {
|
96 |
| - background: theme.$color-primary; |
97 | 95 | content: '';
|
98 | 96 | opacity: 0.4;
|
99 | 97 | position: absolute;
|
|
105 | 103 | }
|
106 | 104 | }
|
107 | 105 | &.secondary {
|
108 |
| - color: theme.$color-primary; |
109 |
| - border: 1px solid theme.$color-border; |
110 |
| - background: #fff; |
| 106 | + border: 1px solid; |
111 | 107 | }
|
112 | 108 | &.primary {
|
113 | 109 | color: #fff;
|
114 |
| - background: theme.$color-primary; |
115 | 110 | }
|
116 | 111 | }
|
117 | 112 |
|
|
121 | 116 | width: 100%;
|
122 | 117 | font-size: 16px;
|
123 | 118 | padding: 6px 12px;
|
124 |
| - border: 1px solid theme.$color-border; |
| 119 | + border: 1px solid; |
125 | 120 | -webkit-appearance: none;
|
126 | 121 | -moz-appearance: none;
|
127 | 122 | }
|
128 | 123 |
|
129 |
| -.theme-dark { |
130 |
| - .body { |
131 |
| - background: theme.$color-bg-container-dark; |
132 |
| - border: 1px solid theme.$color-border-dark; |
| 124 | +@each $theme in ('light', 'dark') { |
| 125 | + .theme-#{$theme} { |
| 126 | + .body { |
| 127 | + @include theme-vars( |
| 128 | + ( |
| 129 | + background-color: color-bg-container, |
| 130 | + border-color: color-border, |
| 131 | + ), |
| 132 | + $theme |
| 133 | + ); |
| 134 | + } |
| 135 | + .button { |
| 136 | + @include theme-var(background-color, color-bg-container, $theme); |
| 137 | + &:active { |
| 138 | + &::before { |
| 139 | + @include theme-var(background-color, color-primary, $theme); |
| 140 | + } |
| 141 | + } |
| 142 | + &.secondary { |
| 143 | + @include theme-vars( |
| 144 | + ( |
| 145 | + color: color-primary, |
| 146 | + border-color: color-border, |
| 147 | + background-color: color-bg-container, |
| 148 | + ), |
| 149 | + $theme |
| 150 | + ); |
| 151 | + } |
| 152 | + &.primary { |
| 153 | + @include theme-var(background-color, color-primary, $theme); |
| 154 | + } |
| 155 | + } |
| 156 | + .input { |
| 157 | + @include theme-vars( |
| 158 | + ( |
| 159 | + background-color: color-bg-container, |
| 160 | + color: color-text, |
| 161 | + border-color: color-border, |
| 162 | + ), |
| 163 | + $theme |
| 164 | + ); |
| 165 | + } |
133 | 166 | }
|
134 | 167 | }
|
0 commit comments