Modify matSelect style when displaying options
P粉449281068
P粉449281068 2024-04-05 09:23:19
0
1
1514

How to change the properties of mat-select when the option is on?

<mat-select class="selector">
     <mat-option><mat-option>
</mat-select>

.selector:focus {
   color: green;
}

I tried using focus but it didn't work very well and I could click on the pad to select without opening the options.

Solution: Solved the problem using

.mat-select[aria-expanded="true"] { 
    color: green 
}

P粉449281068
P粉449281068

reply all(1)
P粉729518806

I solved this problem using .mat-select[aria-expanded="true"] { color: green }

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template