|
5 | 5 | // Mixin that sets the vertical spacing for the infix container of filled form fields.
|
6 | 6 | // We need to apply spacing to the infix container because we removed the input padding
|
7 | 7 | // provided by MDC in order to support arbitrary form-field controls.
|
8 |
| -@mixin _mat-form-field-infix-vertical-spacing-filled($with-label-padding, $no-label-padding) { |
| 8 | +@mixin _mat-mdc-form-field-infix-vertical-spacing-filled($with-label-padding, $no-label-padding) { |
9 | 9 | .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix {
|
10 | 10 | padding-top: map_get($with-label-padding, top);
|
11 | 11 | padding-bottom: map_get($with-label-padding, bottom);
|
|
21 | 21 | // Mixin that sets the vertical spacing for the infix container of outlined form fields.
|
22 | 22 | // We need to apply spacing to the infix container because we removed the input padding
|
23 | 23 | // provided by MDC in order to support arbitrary form-field controls.
|
24 |
| -@mixin _mat-form-field-infix-vertical-spacing-outlined($padding) { |
| 24 | +@mixin _mat-mdc-form-field-infix-vertical-spacing-outlined($padding) { |
25 | 25 | .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix {
|
26 | 26 | padding-top: map_get($padding, top);
|
27 | 27 | padding-bottom: map_get($padding, bottom);
|
|
35 | 35 | // provide spacing that makes arbitrary controls align as specified in the Material Design
|
36 | 36 | // specification. In order to support density, we need to adjust the vertical spacing to be
|
37 | 37 | // based on the density scale.
|
38 |
| -@mixin _mat-form-field-density($config-or-theme) { |
| 38 | +@mixin _mat-mdc-form-field-density($config-or-theme) { |
39 | 39 | $density-scale: mat-get-density-config($config-or-theme);
|
40 | 40 | // Height of the form field that is based on the current density scale.
|
41 | 41 | $height: mdc-density-prop-value(
|
|
96 | 96 | // aligned as if there is no label. This is done similarly in MDC and is specified in the
|
97 | 97 | // Material Design specification. Outline form fields position the control as if there is no
|
98 | 98 | // label. This is because the label overflows the form-field and doesn't need space at the top.
|
99 |
| - @include _mat-form-field-infix-vertical-spacing-outlined($no-label-padding); |
| 99 | + @include _mat-mdc-form-field-infix-vertical-spacing-outlined($no-label-padding); |
100 | 100 |
|
101 | 101 | // MDC hides labels for filled form fields when the form field height decreases. We match
|
102 | 102 | // this behavior in our custom density styles.
|
103 | 103 | @if $hide-filled-floating-label {
|
104 | 104 | // Update the spacing for filled form fields to account for the hidden floating label.
|
105 |
| - @include _mat-form-field-infix-vertical-spacing-filled($no-label-padding, $no-label-padding); |
| 105 | + @include _mat-mdc-form-field-infix-vertical-spacing-filled( |
| 106 | + $no-label-padding, $no-label-padding); |
106 | 107 | .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mdc-floating-label {
|
107 | 108 | display: none;
|
108 | 109 | }
|
|
111 | 112 | // By default, filled form fields align their controls differently based on whether there
|
112 | 113 | // is a label or not. MDC does this too, but we cannot rely on their styles as we support
|
113 | 114 | // arbitrary form field controls and MDC only applies their spacing to the `<input>` elements.
|
114 |
| - @include _mat-form-field-infix-vertical-spacing-filled($with-label-padding, $no-label-padding); |
| 115 | + @include _mat-mdc-form-field-infix-vertical-spacing-filled( |
| 116 | + $with-label-padding, $no-label-padding); |
115 | 117 | }
|
116 | 118 | }
|
0 commit comments