@@ -119,15 +119,17 @@ $_fallback-size: 40px;
119
119
border-color : transparent ;
120
120
}
121
121
122
- .mdc-checkbox :hover .mdc-checkbox__native-control :not (:checked ) ~ .mdc-checkbox__background ,
122
+ // stylelint-disable selector-combinator-space-before
123
+ .mdc-checkbox :hover > .mdc-checkbox__native-control :not (:checked ) ~ .mdc-checkbox__background ,
123
124
.mdc-checkbox :hover
124
- .mdc-checkbox__native-control :not (:indeterminate ) ~ .mdc-checkbox__background {
125
+ > .mdc-checkbox__native-control :not (:indeterminate ) ~ .mdc-checkbox__background {
125
126
@include token-utils .create-token-slot (border-color , unselected- hover- icon- color);
126
127
background-color : transparent ;
127
128
}
129
+ // stylelint-enable selector-combinator-space-before
128
130
129
- .mdc-checkbox :hover .mdc-checkbox__native-control :checked ~ .mdc-checkbox__background ,
130
- .mdc-checkbox :hover .mdc-checkbox__native-control :indeterminate ~ .mdc-checkbox__background {
131
+ .mdc-checkbox :hover > .mdc-checkbox__native-control :checked ~ .mdc-checkbox__background ,
132
+ .mdc-checkbox :hover > .mdc-checkbox__native-control :indeterminate ~ .mdc-checkbox__background {
131
133
@include token-utils .create-token-slot (border-color , selected- hover- icon- color);
132
134
@include token-utils .create-token-slot (background-color , selected- hover- icon- color);
133
135
}
@@ -147,7 +149,7 @@ $_fallback-size: 40px;
147
149
148
150
// Needs extra specificity to override the focus, hover, active states.
149
151
.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive {
150
- .mdc-checkbox :hover .mdc-checkbox__native-control ~ .mdc-checkbox__background ,
152
+ .mdc-checkbox :hover > .mdc-checkbox__native-control ~ .mdc-checkbox__background ,
151
153
.mdc-checkbox .mdc-checkbox__native-control :focus ~ .mdc-checkbox__background ,
152
154
.mdc-checkbox__background {
153
155
@include token-utils .create-token-slot (border-color , disabled- unselected- icon- color);
@@ -306,31 +308,31 @@ $_fallback-size: 40px;
306
308
transition : border-color $_transition-duration $_enter-curve ,
307
309
background-color $_transition-duration $_enter-curve ;
308
310
309
- .mdc-checkbox__checkmark-path {
311
+ > .mdc-checkbox__checkmark > .mdc-checkbox__checkmark-path {
310
312
stroke-dashoffset : 0 ;
311
313
}
312
314
}
313
315
314
316
.mdc-checkbox__native-control :checked ~ .mdc-checkbox__background {
315
- .mdc-checkbox__checkmark {
317
+ > .mdc-checkbox__checkmark {
316
318
transition : opacity $_transition-duration * 2 $_enter-curve ,
317
319
transform $_transition-duration * 2 $_enter-curve ;
318
320
opacity : 1 ;
319
321
}
320
322
321
- .mdc-checkbox__mixedmark {
323
+ > .mdc-checkbox__mixedmark {
322
324
transform : scaleX (1 ) rotate (-45deg );
323
325
}
324
326
}
325
327
.mdc-checkbox__native-control :indeterminate ~ .mdc-checkbox__background {
326
- .mdc-checkbox__checkmark {
328
+ > .mdc-checkbox__checkmark {
327
329
transform : rotate (45deg );
328
330
opacity : 0 ;
329
331
transition : opacity $_transition-duration $_exit-curve ,
330
332
transform $_transition-duration $_exit-curve ;
331
333
}
332
334
333
- .mdc-checkbox__mixedmark {
335
+ > .mdc-checkbox__mixedmark {
334
336
transform : scaleX (1 ) rotate (0deg );
335
337
opacity : 1 ;
336
338
}
@@ -445,11 +447,22 @@ $_fallback-size: 40px;
445
447
446
448
// Conditionally disables the animations of the checkbox.
447
449
@mixin checkbox-noop-animations () {
448
- & ._mat-animation-noopable .mdc-checkbox {
449
- * , * ::before {
450
- transition : none !important ;
451
- animation : none !important ;
452
- }
450
+ & ._mat-animation-noopable > .mat-internal-form-field > .mdc-checkbox {
451
+ @include checkbox-noop-animations-internal ;
452
+ }
453
+ }
454
+
455
+ @mixin checkbox-noop-animations-internal () {
456
+ > .mat-mdc-checkbox-touch-target ,
457
+ > .mdc-checkbox__native-control ,
458
+ > .mdc-checkbox__ripple ,
459
+ > .mat-mdc-checkbox-ripple ::before ,
460
+ > .mdc-checkbox__background ,
461
+ > .mdc-checkbox__background > .mdc-checkbox__checkmark ,
462
+ > .mdc-checkbox__background > .mdc-checkbox__checkmark > .mdc-checkbox__checkmark-path ,
463
+ > .mdc-checkbox__background > .mdc-checkbox__mixedmark {
464
+ transition : none !important ;
465
+ animation : none !important ;
453
466
}
454
467
}
455
468
@@ -465,7 +478,7 @@ $_fallback-size: 40px;
465
478
);
466
479
}
467
480
468
- > .mat-mdc-checkbox-ripple .mat-ripple-element {
481
+ > .mat-mdc-checkbox-ripple > .mat-ripple-element {
469
482
@include token-utils .create-token-slot (
470
483
background-color ,
471
484
unselected- hover- state- layer- color
0 commit comments