|
112 | 112 |
|
113 | 113 | // Disabled state |
114 | 114 | .#{$lumx-base-prefix}-switch--is-disabled { |
115 | | - .#{$lumx-base-prefix}-switch__input-native { |
116 | | - pointer-events: none; |
117 | | - } |
118 | | - |
119 | 115 | .#{$lumx-base-prefix}-switch__input-placeholder { |
120 | 116 | @include lumx-state-disabled-input; |
121 | 117 | } |
|
135 | 131 | } |
136 | 132 | } |
137 | 133 |
|
138 | | -// Hover state |
139 | | -.#{$lumx-base-prefix}-switch--theme-light.#{$lumx-base-prefix}-switch--is-unchecked |
140 | | -.#{$lumx-base-prefix}-switch__input-native:hover |
141 | | -+ .#{$lumx-base-prefix}-switch__input-placeholder { |
142 | | - .#{$lumx-base-prefix}-switch__input-background { |
143 | | - @include lumx-state(lumx-base-const("state", "HOVER"), lumx-base-const("emphasis", "LOW"), "dark"); |
| 134 | +:not(.#{$lumx-base-prefix}-switch--is-disabled) { |
| 135 | + // Hover state |
| 136 | + &.#{$lumx-base-prefix}-switch--theme-light.#{$lumx-base-prefix}-switch--is-unchecked |
| 137 | + .#{$lumx-base-prefix}-switch__input-native:hover |
| 138 | + + .#{$lumx-base-prefix}-switch__input-placeholder { |
| 139 | + .#{$lumx-base-prefix}-switch__input-background { |
| 140 | + @include lumx-state(lumx-base-const("state", "HOVER"), lumx-base-const("emphasis", "LOW"), "dark"); |
| 141 | + } |
144 | 142 | } |
145 | | -} |
146 | 143 |
|
147 | | -.#{$lumx-base-prefix}-switch--theme-dark.#{$lumx-base-prefix}-switch--is-unchecked |
148 | | -.#{$lumx-base-prefix}-switch__input-native:hover |
149 | | -+ .#{$lumx-base-prefix}-switch__input-placeholder { |
150 | | - .#{$lumx-base-prefix}-switch__input-background { |
151 | | - @include lumx-state(lumx-base-const("state", "HOVER"), lumx-base-const("emphasis", "LOW"), "light"); |
| 144 | + &.#{$lumx-base-prefix}-switch--theme-dark.#{$lumx-base-prefix}-switch--is-unchecked |
| 145 | + .#{$lumx-base-prefix}-switch__input-native:hover |
| 146 | + + .#{$lumx-base-prefix}-switch__input-placeholder { |
| 147 | + .#{$lumx-base-prefix}-switch__input-background { |
| 148 | + @include lumx-state(lumx-base-const("state", "HOVER"), lumx-base-const("emphasis", "LOW"), "light"); |
| 149 | + } |
152 | 150 | } |
153 | | -} |
154 | 151 |
|
155 | | -.#{$lumx-base-prefix}-switch--theme-light.#{$lumx-base-prefix}-switch--is-checked |
156 | | -.#{$lumx-base-prefix}-switch__input-native:hover |
157 | | -+ .#{$lumx-base-prefix}-switch__input-placeholder { |
158 | | - .#{$lumx-base-prefix}-switch__input-background { |
159 | | - @include lumx-state( |
160 | | - lumx-base-const("state", "HOVER"), |
161 | | - lumx-base-const("emphasis", "HIGH"), |
162 | | - "primary", |
163 | | - lumx-base-const("theme", "LIGHT") |
164 | | - ); |
| 152 | + &.#{$lumx-base-prefix}-switch--theme-light.#{$lumx-base-prefix}-switch--is-checked |
| 153 | + .#{$lumx-base-prefix}-switch__input-native:hover |
| 154 | + + .#{$lumx-base-prefix}-switch__input-placeholder { |
| 155 | + .#{$lumx-base-prefix}-switch__input-background { |
| 156 | + @include lumx-state( |
| 157 | + lumx-base-const("state", "HOVER"), |
| 158 | + lumx-base-const("emphasis", "HIGH"), |
| 159 | + "primary", |
| 160 | + lumx-base-const("theme", "LIGHT") |
| 161 | + ); |
| 162 | + } |
165 | 163 | } |
166 | | -} |
167 | 164 |
|
168 | | -.#{$lumx-base-prefix}-switch--theme-dark.#{$lumx-base-prefix}-switch--is-checked |
169 | | -.#{$lumx-base-prefix}-switch__input-native:hover |
170 | | -+ .#{$lumx-base-prefix}-switch__input-placeholder { |
171 | | - .#{$lumx-base-prefix}-switch__input-background { |
172 | | - @include lumx-state( |
173 | | - lumx-base-const("state", "HOVER"), |
174 | | - lumx-base-const("emphasis", "HIGH"), |
175 | | - "primary", |
176 | | - lumx-base-const("theme", "DARK") |
177 | | - ); |
| 165 | + &.#{$lumx-base-prefix}-switch--theme-dark.#{$lumx-base-prefix}-switch--is-checked |
| 166 | + .#{$lumx-base-prefix}-switch__input-native:hover |
| 167 | + + .#{$lumx-base-prefix}-switch__input-placeholder { |
| 168 | + .#{$lumx-base-prefix}-switch__input-background { |
| 169 | + @include lumx-state( |
| 170 | + lumx-base-const("state", "HOVER"), |
| 171 | + lumx-base-const("emphasis", "HIGH"), |
| 172 | + "primary", |
| 173 | + lumx-base-const("theme", "DARK") |
| 174 | + ); |
| 175 | + } |
178 | 176 | } |
179 | | -} |
180 | 177 |
|
181 | | -// Active state |
182 | | -.#{$lumx-base-prefix}-switch--theme-light.#{$lumx-base-prefix}-switch--is-unchecked |
183 | | -.#{$lumx-base-prefix}-switch__input-native:active |
184 | | -+ .#{$lumx-base-prefix}-switch__input-placeholder { |
185 | | - .#{$lumx-base-prefix}-switch__input-background { |
186 | | - @include lumx-state(lumx-base-const("state", "ACTIVE"), lumx-base-const("emphasis", "LOW"), "dark"); |
| 178 | + // Active state |
| 179 | + &.#{$lumx-base-prefix}-switch--theme-light.#{$lumx-base-prefix}-switch--is-unchecked |
| 180 | + .#{$lumx-base-prefix}-switch__input-native:active |
| 181 | + + .#{$lumx-base-prefix}-switch__input-placeholder { |
| 182 | + .#{$lumx-base-prefix}-switch__input-background { |
| 183 | + @include lumx-state(lumx-base-const("state", "ACTIVE"), lumx-base-const("emphasis", "LOW"), "dark"); |
| 184 | + } |
187 | 185 | } |
188 | | -} |
189 | 186 |
|
190 | | -.#{$lumx-base-prefix}-switch--theme-dark.#{$lumx-base-prefix}-switch--is-unchecked |
191 | | -.#{$lumx-base-prefix}-switch__input-native:active |
192 | | -+ .#{$lumx-base-prefix}-switch__input-placeholder { |
193 | | - .#{$lumx-base-prefix}-switch__input-background { |
194 | | - @include lumx-state(lumx-base-const("state", "ACTIVE"), lumx-base-const("emphasis", "LOW"), "light"); |
| 187 | + &.#{$lumx-base-prefix}-switch--theme-dark.#{$lumx-base-prefix}-switch--is-unchecked |
| 188 | + .#{$lumx-base-prefix}-switch__input-native:active |
| 189 | + + .#{$lumx-base-prefix}-switch__input-placeholder { |
| 190 | + .#{$lumx-base-prefix}-switch__input-background { |
| 191 | + @include lumx-state(lumx-base-const("state", "ACTIVE"), lumx-base-const("emphasis", "LOW"), "light"); |
| 192 | + } |
195 | 193 | } |
196 | | -} |
197 | 194 |
|
198 | | -.#{$lumx-base-prefix}-switch--theme-light.#{$lumx-base-prefix}-switch--is-checked |
199 | | -.#{$lumx-base-prefix}-switch__input-native:active |
200 | | -+ .#{$lumx-base-prefix}-switch__input-placeholder { |
201 | | - .#{$lumx-base-prefix}-switch__input-background { |
202 | | - @include lumx-state( |
203 | | - lumx-base-const("state", "ACTIVE"), |
204 | | - lumx-base-const("emphasis", "HIGH"), |
205 | | - "primary", |
206 | | - lumx-base-const("theme", "LIGHT") |
207 | | - ); |
| 195 | + &.#{$lumx-base-prefix}-switch--theme-light.#{$lumx-base-prefix}-switch--is-checked |
| 196 | + .#{$lumx-base-prefix}-switch__input-native:active |
| 197 | + + .#{$lumx-base-prefix}-switch__input-placeholder { |
| 198 | + .#{$lumx-base-prefix}-switch__input-background { |
| 199 | + @include lumx-state( |
| 200 | + lumx-base-const("state", "ACTIVE"), |
| 201 | + lumx-base-const("emphasis", "HIGH"), |
| 202 | + "primary", |
| 203 | + lumx-base-const("theme", "LIGHT") |
| 204 | + ); |
| 205 | + } |
208 | 206 | } |
209 | | -} |
210 | 207 |
|
211 | | -.#{$lumx-base-prefix}-switch--theme-dark.#{$lumx-base-prefix}-switch--is-checked |
212 | | -.#{$lumx-base-prefix}-switch__input-native:active |
213 | | -+ .#{$lumx-base-prefix}-switch__input-placeholder { |
214 | | - .#{$lumx-base-prefix}-switch__input-background { |
215 | | - @include lumx-state( |
216 | | - lumx-base-const("state", "ACTIVE"), |
217 | | - lumx-base-const("emphasis", "HIGH"), |
218 | | - "primary", |
219 | | - lumx-base-const("theme", "DARK") |
220 | | - ); |
| 208 | + &.#{$lumx-base-prefix}-switch--theme-dark.#{$lumx-base-prefix}-switch--is-checked |
| 209 | + .#{$lumx-base-prefix}-switch__input-native:active |
| 210 | + + .#{$lumx-base-prefix}-switch__input-placeholder { |
| 211 | + .#{$lumx-base-prefix}-switch__input-background { |
| 212 | + @include lumx-state( |
| 213 | + lumx-base-const("state", "ACTIVE"), |
| 214 | + lumx-base-const("emphasis", "HIGH"), |
| 215 | + "primary", |
| 216 | + lumx-base-const("theme", "DARK") |
| 217 | + ); |
| 218 | + } |
221 | 219 | } |
222 | 220 | } |
223 | 221 |
|
|
0 commit comments