components
components copied to clipboard
bug(mat-form-field): changes appearance with box-sizing: border-box
Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
A lot of apps (notably the ones using Tailwind) use * {box-sizing: border-box; }
to default box-sizing
to border-box
.
This causes top outline on focused mat-form-field
with appearance="outline"
to change appearance around the label when it's floating. It doesn't change much but enough to feel that something's off because the upper-left bit becomes shorter.
I assume material is "border-box friendly" because I saw a few similar resolved issues while looking if this has been reported
Reproduction
Steps to reproduce:
- Use
* {box-sizing: border-box; }
- Use
mat-form-field
withappearance="outline"
https://stackblitz.com/edit/components-issue-jksnnz?file=src/styles.scss
Expected Behavior
Appearance doesn't change
Actual Behavior
Appearance changes
Environment
- Angular: 14.1.3
- CDK/Material: 14.1.3
- Browser(s): Chrome 106.0.5249.91
- Operating System (e.g. Windows, macOS, Ubuntu): Windows