File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change 1212
1313// Tokens that can be configured through Angular Material's color theming API.
1414@function get-color-tokens ($theme ) {
15- $table-background : inspection .get-theme-color ($theme , background , card );
16- $text-color : inspection .get-theme-color ($theme , foreground , secondary-text );
17- $arrow-color : null;
18-
19- // Because the arrow is made up of multiple elements that are stacked on top of each other,
20- // we can't use the semi-transparent color from the theme directly. If the value is a color
21- // *type*, we convert it into a solid color by taking the opacity from the rgba value and
22- // using the value to determine the percentage of the background to put into foreground
23- // when mixing the colors together. Otherwise, if it resolves to something different
24- // (e.g. it resolves to a CSS variable), we use the color directly.
25- @if (meta .type-of ($table-background ) == color and meta .type-of ($text-color ) == color ) {
26- $text-opacity : color .opacity ($text-color );
27- $arrow-color : color .mix ($table-background , rgba ($text-color , 1 ), (1 - $text-opacity ) * 100% );
28- }
29- @else {
30- $arrow-color : $text-color ;
31- }
32-
3315 @return (
34- sort- arrow- color: $arrow- color ,
16+ sort- arrow- color: inspection . get-theme- color( $theme , foreground , text ) ,
3517 );
3618}
3719
You can’t perform that action at this time.
0 commit comments