Skip to content

Commit e5fb1d9

Browse files
author
Andrew Seguin
committed
fix(material/button): remove internal-only M2 styles
1 parent 7791972 commit e5fb1d9

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

src/material/button/_m2-fab.scss

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,28 +65,10 @@ $prefix: (mat, fab);
6565

6666
// Generates the mapping for the properties that change based on the FAB palette color.
6767
@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;
7368
$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);
9072

9173
@return (
9274
container-color: inspection.get-theme-color($theme, $palette-name, default),

0 commit comments

Comments
 (0)