angular / angular/components

Form field and button in the same row but inconsistent height across variants of form field

Đang mở
#20,413 6 bình luận 1 reaction 0 người được giao Xem trên GitHub
area: material/button 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ả

#### Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue

would like to implement row with form fields and button with same height.
![image](https://user-images.githubusercontent.com/6324664/91208736-4759d880-e728-11ea-88d1-1cde6e0b9155.png)

Steps to reproduce:
1. https://angular-ivy-qdy6pn.stackblitz.io
2. Pure angular stack ( no custom styles) angular , material , flex


#### Expected Behavior
What behavior were you expecting to see?
it requires to write lot of custom styles for each variant and button. ( not maintainable)
one custom style should work across all variants of form fields and should handle height of buttons and fom-field.

#### Actual Behavior

What behavior did you actually see?
![image](https://user-images.githubusercontent.com/6324664/91209572-918f8980-e729-11ea-95e7-0eb9c9b30c28.png)

.mat-form-field-appearance-legacy .mat-form-field-wrapper {
padding-bottom: 1.25em;
}

.mat-form-field-appearance-standard .mat-form-field-flex {
padding-top: .75em;
}

.mat-form-field-appearance-fill .mat-form-field-flex {
border-radius: 4px 4px 0 0;
padding: .75em .75em 0 .75em;
}

.mat-form-field-appearance-outline .mat-form-field-infix {
padding: 0.75em 0 0.75em 0 !important;
}

.mat-form-field-appearance-legacy .mat-form-field-infix {
padding-top: 0.75em !important;
}

.mat-form-field-appearance-legacy .mat-form-field-wrapper {
padding-bottom: 1.75em;
}

#### Environment

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

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 các bản tái hiện StackBlitz được liên kết và so sánh các biến thể trường biểu mẫu legacy, standard, fill và outline với một nút trên cùng một hàng. Xem xét các selector .mat-form-field-appearance-* được liệt kê và xác định liệu một style component dùng chung có thể căn chỉnh chiều cao của chúng mà không cần các rule tùy chỉnh riêng cho từng biến thể hay không. Được xem là hoàn tất khi các biến thể và nút có chiều cao hàng nhất quán bằng một style có thể duy trì duy nhất.

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ó
4/5
Thời gian dự kiến
3-5 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
35/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.