angular / angular/components

bug(mat-form-field): Input and Select have different height

Đang mở
#24,612 5 bình luận 0 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

If I put a Input-FormField next to a FormField with a MatSelect, there seems to be a height difference of 0.875px

![image](https://user-images.githubusercontent.com/50733002/158801044-c1ddfc15-e422-4504-a2cf-69a1f07e53f7.png)

### Reproduction

Steps to reproduce:
1. Just put both next to each other an check height using DevTools

https://stackblitz.com/edit/angular-3dch32?file=src/app/form-field-overview-example.ts

### Expected Behavior

Both MatFormFields should have the same height.

### Actual Behavior

The MatFormField with the MatSelect inside seems to be 0.875px taller.

### Environment

- Angular:
- CDK/Material: 13.2.6
- Browser(s): Google Chrome 99.0.4844.51
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

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/app/form-field-overview-example.ts và so sánh các MatFormFields Input và Select được render trong Chrome DevTools. Truy tìm chênh lệch chiều cao trong các style Material form-field; hoàn tất khi các field liền kề có chiều cao bằng nhau và bản tái hiện không còn hiển thị chênh lệch 0.875px.

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
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
38/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.