Skip to content

Commit 951d366

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

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
@@ -61,28 +61,10 @@
6161

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

8769
@return (
8870
fab-container-color: inspection.get-theme-color($theme, $palette-name, default),

0 commit comments

Comments
 (0)