@@ -65,28 +65,10 @@ $prefix: (mat, fab);
65
65
66
66
// Generates the mapping for the properties that change based on the FAB palette color.
67
67
@function private-get-color-palette-color-tokens ($theme , $palette-name ) {
68
- // Ideally we would derive all values directly from the theme, but it causes a lot of regressions
69
- // internally. For now we fall back to the old hardcoded behavior only for internal apps.
70
- $foreground-color : null;
71
- $state-layer-color : null;
72
- $ripple-color : null;
73
68
$contrast-color : inspection .get-theme-color ($theme , $palette-name , default-contrast );
74
-
75
- @if (m2-utils .$private-is-internal-build or
76
- meta .type-of ($contrast-color ) != ' color' ) {
77
- $is-dark : inspection .get-theme-type ($theme ) == dark ;
78
- $container-color : inspection .get-theme-color ($theme , $palette-name );
79
- $contrast-tone : m2-utils .contrast-tone ($container-color , $is-dark );
80
- $color : if ($contrast-tone == ' dark' , #000 , #fff );
81
- $foreground-color : $color ;
82
- $state-layer-color : $color ;
83
- $ripple-color : rgba ($color , 0.1 );
84
- }
85
- @else {
86
- $foreground-color : inspection .get-theme-color ($theme , $palette-name , default-contrast , 1 );
87
- $state-layer-color : inspection .get-theme-color ($theme , $palette-name , default-contrast , 1 );
88
- $ripple-color : inspection .get-theme-color ($theme , $palette-name , default-contrast , 0.1 );
89
- }
69
+ $foreground-color : inspection .get-theme-color ($theme , $palette-name , default-contrast , 1 );
70
+ $state-layer-color : inspection .get-theme-color ($theme , $palette-name , default-contrast , 1 );
71
+ $ripple-color : inspection .get-theme-color ($theme , $palette-name , default-contrast , 0.1 );
90
72
91
73
@return (
92
74
container- color: inspection .get-theme-color ($theme , $palette-name , default ),
0 commit comments