1
1
@use ' sass:math' ;
2
2
@use ' @angular/cdk' ;
3
3
@use ' @material/typography/typography' as mdc-typography ;
4
- @use ' ../core/style/elevation' ;
5
4
@use ' ../core/style/vendor-prefixes' ;
6
5
@use ' ../core/style/variables' ;
7
6
@use ' ../core/tokens/token-utils' ;
@@ -32,6 +31,11 @@ $scale: 0.75 !default;
32
31
@include token-utils .create-token-slot (letter-spacing , trigger- text- tracking);
33
32
}
34
33
}
34
+ @include token-utils .use-tokens (tokens-mat-select .$prefix , tokens-mat-select .get-token-slots ()) {
35
+ div .mat-mdc-select-panel {
36
+ @include token-utils .create-token-slot (box-shadow , container- elevation- shadow);
37
+ }
38
+ }
35
39
36
40
.mat-mdc-select-disabled {
37
41
@include token-utils .use-tokens (
@@ -83,6 +87,13 @@ $scale: 0.75 !default;
83
87
}
84
88
}
85
89
90
+ .mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow ,
91
+ .mat-form-field-invalid :not (.mat-form-field-disabled ) .mat-mdc-form-field-infix ::after {
92
+ @include token-utils .use-tokens (tokens-mat-select .$prefix , tokens-mat-select .get-token-slots ()) {
93
+ @include token-utils .create-token-slot (color , invalid- arrow- color);
94
+ }
95
+ }
96
+
86
97
.mat-mdc-select-arrow {
87
98
width : $mat-select-arrow-size * 2 ;
88
99
height : $mat-select-arrow-size ;
@@ -96,10 +107,6 @@ $scale: 0.75 !default;
96
107
@include token-utils .create-token-slot (color , focused- arrow- color);
97
108
}
98
109
99
- .mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid & {
100
- @include token-utils .create-token-slot (color , invalid- arrow- color);
101
- }
102
-
103
110
.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled & {
104
111
@include token-utils .create-token-slot (color , disabled- arrow- color);
105
112
}
@@ -128,7 +135,6 @@ $scale: 0.75 !default;
128
135
// DOM for the Gmat versions to work. We need to bump up the specificity here
129
136
// so that it's higher than MDC's styles.
130
137
div .mat-mdc-select-panel {
131
- @include elevation .elevation (8 );
132
138
width : 100% ; // Ensures that the panel matches the overlay width.
133
139
max-height : $mat-select-panel-max-height ;
134
140
outline : 0 ;
@@ -160,6 +166,10 @@ div.mat-mdc-select-panel {
160
166
border-bottom-right-radius : 0 ;
161
167
transform-origin : bottom center ;
162
168
}
169
+
170
+ .mat-mdc-option {
171
+ --mdc-list-list-item-container-color : var (--mat-select-panel-background-color );
172
+ }
163
173
}
164
174
165
175
.mat-mdc-select-placeholder {
0 commit comments