Skip to content

Commit 9be94a0

Browse files
authored
fix(material/select): fix arrow alignment (#25626)
1 parent fd9d326 commit 9be94a0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/material/form-field/_form-field-native-select.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ $mat-form-field-select-horizontal-end-padding: $mat-form-field-select-arrow-widt
4646
border-top: $mat-form-field-select-arrow-height solid;
4747
position: absolute;
4848
right: 0;
49+
top: 50%;
50+
margin-top: -#{math.div($mat-form-field-select-arrow-height, 2)};
4951

5052
// Make the arrow non-clickable so the user can click on the form control under it.
5153
pointer-events: none;

src/material/select/select.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@ $scale: 0.75 !default;
5757
display: inline-flex;
5858
align-items: center;
5959

60-
// When used in a box appearance form-field the arrow should be shifted up 40%.
60+
// When used in a fill appearance with a label, form-field the arrow should be shifted up 8px.
6161
.mat-form-field-appearance-fill & {
62-
transform: translateY(-40%);
62+
transform: translateY(-8px);
63+
}
64+
65+
.mat-form-field-appearance-fill .mdc-text-field--no-label & {
66+
transform: none;
6367
}
6468
}
6569

0 commit comments

Comments
 (0)