|
138 | 138 | } |
139 | 139 | } |
140 | 140 |
|
141 | | - // The frame's ::before element is used as a focus indicator for the checkbox |
142 | | - .mdc-checkbox__background::before { |
143 | | - @include focus-indicator_($query); |
144 | | - } |
145 | | - |
146 | | - .mdc-checkbox__native-control:focus ~ .mdc-checkbox__background::before { |
147 | | - @include focus-indicator--focused_($query); |
148 | | - } |
149 | | - |
150 | 141 | .mdc-checkbox__native-control { |
151 | 142 | @include feature-targeting.targets($feat-structure) { |
152 | 143 | @include native-control_; |
|
246 | 237 | #{checkbox-theme.$ripple-target} { |
247 | 238 | @include ripple.target-common($query: $query); |
248 | 239 | } |
249 | | - |
250 | | - .mdc-ripple-upgraded--background-focused .mdc-checkbox__background::before { |
251 | | - @include feature-targeting.targets($feat-structure) { |
252 | | - content: none; |
253 | | - } |
254 | | - } |
255 | 240 | } |
256 | 241 |
|
257 | 242 | @mixin base_ { |
|
381 | 366 | will-change: background-color, border-color; |
382 | 367 | } |
383 | 368 |
|
384 | | - .mdc-checkbox__background::before { |
385 | | - @include feature-targeting.targets($feat-color) { |
386 | | - @include theme.prop(background-color, on-surface); |
387 | | - } |
388 | | - } |
389 | | - |
390 | 369 | @include feature-targeting.targets($feat-animation) { |
391 | 370 | transition: transition-exit(background-color), transition-exit(border-color); |
392 | 371 | } |
|
396 | 375 | transition: transition-enter(border-color), transition-enter(background-color); |
397 | 376 | } |
398 | 377 |
|
399 | | -// Focus indicator |
400 | | - |
| 378 | +// For backward compatibility. |
401 | 379 | @mixin focus-indicator_($query: feature-targeting.all()) { |
402 | | - $feat-animation: feature-targeting.create-target($query, animation); |
403 | | - $feat-structure: feature-targeting.create-target($query, structure); |
404 | | - |
405 | | - @include feature-targeting.targets($feat-structure) { |
406 | | - position: absolute; |
407 | | - transform: scale(0, 0); |
408 | | - border-radius: 50%; |
409 | | - opacity: 0; |
410 | | - pointer-events: none; |
411 | | - content: ''; |
412 | | - will-change: opacity, transform; |
413 | | - } |
414 | | - |
415 | | - @include feature-targeting.targets($feat-animation) { |
416 | | - transition: transition-exit(opacity), transition-exit(transform); |
417 | | - } |
418 | 380 | } |
419 | | - |
420 | 381 | @mixin focus-indicator--focused_($query: feature-targeting.all()) { |
421 | | - $feat-animation: feature-targeting.create-target($query, animation); |
422 | | - $feat-structure: feature-targeting.create-target($query, structure); |
423 | | - |
424 | | - @include feature-targeting.targets($feat-structure) { |
425 | | - transform: scale(1); |
426 | | - opacity: checkbox-theme.$focus-indicator-opacity; |
427 | | - } |
428 | | - |
429 | | - @include feature-targeting.targets($feat-animation) { |
430 | | - transition: transition-enter(opacity, 0ms, 80ms), |
431 | | - transition-enter(transform, 0ms, 80ms); |
432 | | - } |
433 | 382 | } |
434 | 383 |
|
435 | 384 | // Native input |
|
0 commit comments