You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is also visible in DevTools.
This transformation rule looks valid because it has a prefix icon.
But in addition, if the element is moved on the x-axis, its width should be reduced by a value equal to the offset to fit the form field bounds.
The label associated with a MatFormField is not positioned correctly.
Case 1 - matPrefix
As visible in the following image, the label is outside the bounds of the form field.
Inside
form-field.ts
-_updateOutlineLabelOffset()
the HTML element is moved on the x-axis:Case 2 - matSuffix
For
matSuffix
the fix would be easier, it should only update its width with the offset value.However here it seems that the offset variable is missing from the scss file.
Adding the CSS variable to the above file and updating the width should help with this issue.
Reproduction
StackBlitz link: https://stackblitz.com/edit/rudguk-yo1ggv?file=src%2Fexample%2Fform-field-appearance-example.html
Expected Behavior
I expect the label to fit into the borders of the wrapping element.
Actual Behavior
The label goes outside the borders of the wrapping element.
Environment
The text was updated successfully, but these errors were encountered: