angular / angular/components

bug(form-field): matTextSuffix/matTextPrefix not vertically aligned with label

Đang mở
#28,448 2 bình luận 2 reaction 0 người được giao Xem trên GitHub
area: material/form-field P3
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

### 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

The label of a mat-form-field is not vertically aligned with the matTextSuffix or matTextPrefix.

![Screenshot 2024-01-18 at 8 42 10 AM](https://github.com/angular/components/assets/32067562/47159140-76bf-4b6c-ab2f-2e76f2fced4a)

Notice how the suffix and prefix are a couple or so pixels above the label

### Reproduction

StackBlitz link: https://stackblitz.com/edit/t9161j?file=src%2Fexample%2Fform-field-prefix-suffix-example.html

### Expected Behavior

Label to be vertically aligned with both matTextSuffix and matTextPrefix

### Actual Behavior

Label is not vertically aligned with both matTextSuffix and matTextPrefix

### Environment

- Angular: 16
- CDK/Material: ^16.2.7
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết tại src/example/form-field-prefix-suffix-example.html và xác nhận độ lệch theo chiều dọc giữa label và matTextSuffix/matTextPrefix trong Angular 16. Theo dõi quá trình render và tạo kiểu của Material form-field từ ví dụ đó, sau đó xác minh rằng label, prefix và suffix được căn chỉnh theo chiều dọc trong bản tái hiện.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
design, frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.