Skip to content

Commit af3f0a7

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

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/material/button/_m2-button.scss

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,7 @@ $prefix: (mat, button);
4747
// Tokens that can be configured through Angular Material's color theming API.
4848
@function get-color-tokens($theme) {
4949
$is-dark: inspection.get-theme-type($theme) == dark;
50-
51-
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
52-
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
53-
$outline: if(m2-utils.$private-is-internal-build,
54-
rgba(if($is-dark, #fff, #000), 0.12),
55-
inspection.get-theme-color($theme, foreground, divider)
56-
);
57-
50+
$outline: inspection.get-theme-color($theme, foreground, divider);
5851
@return (
5952
filled-container-color: inspection.get-theme-color($theme, background, card),
6053
filled-disabled-container-color:
@@ -125,19 +118,6 @@ $prefix: (mat, button);
125118
$label-text-color: inspection.get-theme-color($theme, $palette-name, default-contrast, 1);
126119
$ripple-opacity: 0.1;
127120

128-
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
129-
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
130-
@if (m2-utils.$private-is-internal-build or
131-
meta.type-of($contrast-color) != 'color') {
132-
$is-dark: inspection.get-theme-type($theme) == dark;
133-
$container-color: inspection.get-theme-color($theme, $palette-name);
134-
$contrast-tone: m2-utils.contrast-tone($container-color, $is-dark);
135-
$color: if($contrast-tone == 'dark', #000, #fff);
136-
$state-layer-color: $color;
137-
$ripple-color: rgba($color, 0.1);
138-
$label-text-color: if($contrast-tone == 'dark', #000, #fff);
139-
}
140-
141121
// outlined-outline-color:
142122
// TODO: we shouldn't have to set this since it's the same as the non-palette version, however
143123
// there are a bunch of tests internally that depend on it. We should remove this and clean

0 commit comments

Comments
 (0)