Skip to content

Commit efae496

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

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/material/form-field/_m2-form-field.scss

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,9 @@ $prefix: (mat, form-field);
3030
$surface: inspection.get-theme-color($theme, background, card);
3131
$warn-color: inspection.get-theme-color($theme, warn);
3232
$color-tokens: private-get-color-palette-color-tokens($theme, primary);
33-
$on-surface: if($is-dark, #fff, #000);
34-
35-
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
36-
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
37-
$on-surface: if($is-dark, #fff, #000);
38-
$text-color-base: if(m2-utils.$private-is-internal-build, $on-surface,
39-
inspection.get-theme-color($theme, foreground, text, 1));
40-
$disabled-text-color-base: if(m2-utils.$private-is-internal-build, $on-surface,
41-
inspection.get-theme-color($theme, foreground, disabled-text, 1));
42-
$divider-base: if(m2-utils.$private-is-internal-build, $on-surface,
43-
inspection.get-theme-color($theme, foreground, divider, 1));
33+
$text-color-base: inspection.get-theme-color($theme, foreground, text, 1);
34+
$disabled-text-color-base: inspection.get-theme-color($theme, foreground, disabled-text, 1);
35+
$divider-base: inspection.get-theme-color($theme, foreground, divider, 1);
4436

4537
@return map.merge($color-tokens, (
4638
// MDC has a token for the enabled placeholder, but not for the disabled one.
@@ -76,8 +68,8 @@ $prefix: (mat, form-field);
7668
disabled-select-arrow-color: inspection.get-theme-color($theme, foreground, icon, 0.38),
7769
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
7870
focus-state-layer-opacity: if($is-dark, 0.24, 0.08),
79-
filled-container-color: _variable-safe-mix($on-surface, $surface, 4%),
80-
filled-disabled-container-color: _variable-safe-mix($on-surface, $surface, 2%),
71+
filled-container-color: _variable-safe-mix($text-color-base, $surface, 4%),
72+
filled-disabled-container-color: _variable-safe-mix($text-color-base, $surface, 2%),
8173
filled-label-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
8274
filled-hover-label-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
8375
filled-disabled-label-text-color:

0 commit comments

Comments
 (0)