Skip to content

Commit 375634d

Browse files
committed
Allow [@.disabled] binding on component host
* It can happen that someone applies `[@.disabled]` directly on the component host element (e.g. `<mat-tab-group [@.disabled]="disableAnimations"]></mat-tab-group>`)
1 parent eb9df3c commit 375634d

File tree

11 files changed

+29
-26
lines changed

11 files changed

+29
-26
lines changed

src/lib/button/_button-base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ $mat-mini-fab-padding: 8px !default;
8484
transition: background $swift-ease-out-duration $swift-ease-out-timing-function,
8585
mat-elevation-transition-property-value();
8686

87-
&._mat-animation-noopable, .ng-animate-disabled & {
87+
&._mat-animation-noopable, &.ng-animate-disabled, .ng-animate-disabled & {
8888
transition: none;
8989
}
9090

src/lib/checkbox/checkbox.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ $_mat-checkbox-mark-stroke-size: 2 / 15 * $mat-checkbox-size !default;
184184
transition: background $swift-ease-out-duration $swift-ease-out-timing-function,
185185
mat-elevation-transition-property-value();
186186

187-
&._mat-animation-noopable, .ng-animate-disabled & {
187+
&._mat-animation-noopable, &.ng-animate-disabled, .ng-animate-disabled & {
188188
transition: none;
189189
}
190190

src/lib/core/selection/pseudo-checkbox/pseudo-checkbox.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $_mat-pseudo-checkmark-size: $mat-checkbox-size - (2 * $_mat-pseudo-checkbox-pad
3535
border-color: transparent;
3636
}
3737

38-
&._mat-animation-noopable, .ng-animate-disabled & {
38+
&._mat-animation-noopable, &.ng-animate-disabled, .ng-animate-disabled & {
3939
transition: none;
4040

4141
&::after {

src/lib/form-field/form-field-fill.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ $mat-form-field-fill-subscript-padding:
6363
}
6464

6565
&:not(.mat-form-field-disabled) {
66-
&._mat-animation-noopable, .ng-animate-disabled & {
66+
&._mat-animation-noopable, &.ng-animate-disabled, .ng-animate-disabled & {
6767
.mat-form-field-flex:hover ~ .mat-form-field-underline .mat-form-field-ripple {
6868
transition: none;
6969
}

src/lib/form-field/form-field-outline.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ $mat-form-field-outline-subscript-padding:
133133
padding: 0 $mat-form-field-outline-subscript-padding;
134134
}
135135

136-
&._mat-animation-noopable, .ng-animate-disabled & {
136+
&._mat-animation-noopable, &.ng-animate-disabled, .ng-animate-disabled & {
137137
&:not(.mat-form-field-disabled) .mat-form-field-flex:hover ~ .mat-form-field-outline,
138138
.mat-form-field-outline,
139139
.mat-form-field-outline-start,

src/lib/form-field/form-field-standard.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ $mat-form-field-standard-padding-top: 0.75em !default;
6060
}
6161

6262
&:not(.mat-form-field-disabled) {
63-
&._mat-animation-noopable, .ng-animate-disabled & {
63+
&._mat-animation-noopable, &.ng-animate-disabled, .ng-animate-disabled & {
6464
.mat-form-field-flex:hover ~ .mat-form-field-underline .mat-form-field-ripple {
6565
transition: none;
6666
}

src/lib/form-field/form-field.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ $mat-form-field-default-infix-width: 180px !default;
217217
display: block;
218218
}
219219

220-
.mat-form-field._mat-animation-noopable, .ng-animate-disabled .mat-form-field {
220+
._mat-animation-noopable, .ng-animate-disabled {
221221
.mat-form-field-label,
222222
.mat-form-field-ripple {
223223
transition: none;

src/lib/progress-bar/progress-bar.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
1616
transition: opacity $mat-progress-bar-piece-animation-duration linear;
1717
width: 100%;
1818

19-
&._mat-animation-noopable, .ng-animate-disabled & {
19+
&._mat-animation-noopable, &.ng-animate-disabled, .ng-animate-disabled & {
2020
transition: none;
2121
}
2222

@@ -139,7 +139,7 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
139139
}
140140

141141
// Disabled animations handling.
142-
&._mat-animation-noopable, .ng-animate-disabled & {
142+
&._mat-animation-noopable, &.ng-animate-disabled, .ng-animate-disabled & {
143143
.mat-progress-bar-fill,
144144
.mat-progress-bar-fill::after,
145145
.mat-progress-bar-buffer,

src/lib/progress-spinner/progress-spinner.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $_mat-progress-spinner-default-circumference: $pi * $_mat-progress-spinner-defau
1111
display: block;
1212
position: relative;
1313

14-
&._mat-animation-noopable, .ng-animate-disabled & {
14+
&._mat-animation-noopable, &.ng-animate-disabled, .ng-animate-disabled & {
1515
animation: none;
1616

1717
circle {

src/lib/select/select.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ $mat-select-placeholder-arrow-space: 2 * ($mat-select-arrow-size + $mat-select-a
6868
transition: transform $swift-ease-out-duration $swift-ease-out-timing-function;
6969
}
7070

71-
._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty &,
72-
.ng-animate-disabled .mat-form-field-appearance-standard .mat-select.mat-select-empty & {
73-
transition: none;
71+
.mat-form-field-appearance-standard {
72+
.ng-animate-disabled &, &.ng-animate-disabled, &._mat-animation-noopable {
73+
.mat-select.mat-select-empty {
74+
transition: none;
75+
}
76+
}
7477
}
7578
}
7679

0 commit comments

Comments
 (0)