File tree Expand file tree Collapse file tree 3 files changed +520
-525
lines changed
src/material-experimental/mdc-form-field Expand file tree Collapse file tree 3 files changed +520
-525
lines changed Original file line number Diff line number Diff line change 56
56
"@types/youtube" : " ^0.0.38" ,
57
57
"@webcomponents/custom-elements" : " ^1.1.0" ,
58
58
"core-js" : " ^2.6.9" ,
59
- "material-components-web" : " 6.0.0-canary.17b9699c4 .0" ,
59
+ "material-components-web" : " 6.0.0-canary.d5808057f .0" ,
60
60
"rxjs" : " ^6.5.3" ,
61
61
"systemjs" : " 0.19.43" ,
62
62
"tslib" : " ^1.10.0" ,
Original file line number Diff line number Diff line change 27
27
border : none ;
28
28
}
29
29
30
- // Reset the padding that MDC sets on native input elements. We cannot rely on this
31
- // spacing as we support arbitrary form-field controls which aren't necessarily matching
32
- // the "mdc-text-field__input" class. Note: We need the first selector to overwrite the
33
- // default no-label MDC padding styles which are set with a very high specificity.
30
+ // Reset the height that MDC sets on native input elements. We cannot rely on their
31
+ // fixed height as we handle vertical spacing differently. MDC sets a fixed height for
32
+ // inputs and modifies the baseline so that the textfield matches the spec. This does
33
+ // not work for us since we support arbitrary form field controls which don't necessarily
34
+ // use an `input` element. We organize the vertical spacing on the infix container.
34
35
.mdc-text-field--no-label :not (.mdc-text-field--textarea )
35
36
.mat-mdc-input-element.mdc-text-field__input ,
36
37
.mat-mdc-text-field-wrapper .mat-mdc-input-element {
37
- padding : 0 ;
38
+ height : auto ;
38
39
}
39
40
40
41
// MDC adds vertical spacing to inputs. We removed this spacing and intend to add it
77
78
opacity : 1 ;
78
79
}
79
80
80
- // We removed the horizontal inset on input elements, but need to re-add the spacing to
81
- // the actual form-field flex container that contains the prefixes, suffixes and infix.
82
- .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex {
83
- padding : 0 $mdc-text-field-input-padding ;
84
- }
85
-
86
81
// Since we moved the horizontal spacing from the input to the form-field flex container
87
82
// and the MDC floating label tries to account for the horizontal spacing, we need to reset
88
83
// the shifting since there is no padding the label needs to account for. Note that we do not
You can’t perform that action at this time.
0 commit comments