Skip to content

Commit 78f0cec

Browse files
devversionjelbourn
authored andcommitted
fix(select): bigger height for underline on focus (#5510)
* On focus the underline height should be as twice as big as the normal height. This is similar to the input component of Angular Material. * Replaces the `aria-disabled` attribute selectors with the `mat-select-disabled` class. Fixes #5499
1 parent e21b64c commit 78f0cec

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/lib/select/select.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ $mat-select-trigger-min-width: 112px !default;
1010
$mat-select-arrow-size: 5px !default;
1111
$mat-select-arrow-margin: 4px !default;
1212
$mat-select-panel-max-height: 256px !default;
13+
$mat-select-trigger-underline-height: 1px !default;
1314

1415
.mat-select {
1516
display: inline-block;
@@ -25,7 +26,7 @@ $mat-select-panel-max-height: 256px !default;
2526
position: relative;
2627
box-sizing: border-box;
2728

28-
[aria-disabled='true'] & {
29+
.mat-select-disabled & {
2930
@include user-select(none);
3031
cursor: default;
3132
}
@@ -36,9 +37,13 @@ $mat-select-panel-max-height: 256px !default;
3637
bottom: 0;
3738
left: 0;
3839
right: 0;
39-
height: 1px;
40+
height: $mat-select-trigger-underline-height;
4041

41-
[aria-disabled='true'] & {
42+
.mat-select:focus & {
43+
height: $mat-select-trigger-underline-height * 2;
44+
}
45+
46+
.mat-select-disabled & {
4247
@include mat-control-disabled-underline();
4348
background-color: transparent;
4449
background-position: 0 bottom;

0 commit comments

Comments
 (0)