Label for mat-form-field is overlapping with mat-icon in mat-tab.
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
### Is this a regression?
- [X] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
14
### Description
Label is overlapping with icon.
- When using in 2nd Tab of Tabgroup, surrounded with a e.g. a div, p, ...
- and
- When using the the mat-form-field with appearance "outline" and an icon with matPrefix.
```
Outline form field
sentiment_very_satisfied
Hint
```
### Reproduction
Steps to reproduce:
1. add to app.module
import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatTabsModule } from '@angular/material/tabs';
2. add to app.component
```
Outline form field
sentiment_very_satisfied
Hint
Outline form field
sentiment_very_satisfied
Hint
#
```
3.
for the input field in 2nd tab : label is overlapping with mat-icon
4.
when inspecting the style, it seems the X transform is not correct

### Expected Behavior
Label should have correct margin
### Actual Behavior
Label is overlapping with mat-icon
### Environment
- Angular:15.0.0
- CDK/Material:15.1.0
- Browser(s):Chrome, Edge
- Operating System (e.g. Windows, macOS, Ubuntu):Windows 10
Contributor guide
Research direction
Start by reproducing the supplied Angular Material example with an outlined mat-form-field, matPrefix icon, and the second mat-tab, then inspect the label transform styles noted in the report. Done means the label has the correct margin and no longer overlaps the mat-icon in the second tab while preserving the first tab's behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100