File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 105
105
width : 100% / $font-scale ;
106
106
}
107
107
108
+ // This is a total duplicate of the mixin above with insignificant values added to the rules.
109
+ // This exists because the mixin is used in two places. When Google's CSS Optimizer runs over this
110
+ // css (after compiling from sass), it combines those two declarations into one. However, one of
111
+ // those places uses `:-webkit-autofill`. When Firefox encounters this unknown pseuedo-class,
112
+ // it ignores the entire rule. To work around this, we force one of the delcarations to be
113
+ // technically different but still render the same by adding a tiny value to the transform / width.
114
+ @mixin _mat-form-field-placeholder-float-nodedupe ($font-scale , $infix-padding , $infix-margin-top ) {
115
+ transform : translateY (- $infix-margin-top - $infix-padding ) scale ($font-scale ) perspective (100px )
116
+ translateZ (0.002px );
117
+ -ms-transform : translateY (- $infix-margin-top - $infix-padding ) scale ($font-scale );
118
+ width : (100% / $font-scale ) + 0.0001 ;
119
+ }
120
+
108
121
@mixin mat-form-field-typography ($config ) {
109
122
// The unit-less line-height from the font config.
110
123
$line-height : mat-line-height ($config , input );
182
195
183
196
.mat-form-field-autofill-control :-webkit-autofill + .mat-form-field-placeholder-wrapper
184
197
.mat-form-field-placeholder {
185
- @include _mat-form-field-placeholder-floating (
198
+ @include _mat-form-field-placeholder-float-nodedupe (
186
199
$subscript-font-scale , $infix-padding , $infix-margin-top );
187
200
}
188
201
}
You can’t perform that action at this time.
0 commit comments