angular / angular/components

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

オープン
#20,413 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る
area: material/button area: material/form-field P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされた StackBlitz の再現から始め、同じ行にあるボタンと、フォームフィールドの legacy、standard、fill、outline の各バリアントを比較します。記載されている .mat-form-field-appearance-* セレクターを確認し、バリアントごとのカスタムルールを使わずに、共有コンポーネントスタイルでそれらの高さを揃えられるか判断します。バリアントとボタンが、1 つの保守可能なスタイルによって一貫した行の高さになることを完了条件とします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。