Content-Length: 304561 | pFad | http://github.com/angular/components/commit/82ab91e58ad03207c6dfa25f5995dde1bd5760cf

65 fix(material/form-field): remove internal-only M2 styles (#31021) · angular/components@82ab91e · GitHub
Skip to content

Commit 82ab91e

Browse files
authored
fix(material/form-field): remove internal-only M2 styles (#31021)
1 parent dc3bfc3 commit 82ab91e

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@use '../core/m2/palette' as m2-palette;
22
@use '../core/style/sass-utils';
3+
@use '../core/tokens/m2-utils';
34
@use '../core/theming/inspection';
45
@use '../core/theming/theming';
5-
@use '../core/tokens/m2-utils';
66
@use 'sass:color';
77
@use 'sass:map';
88
@use 'sass:math';
@@ -30,16 +30,9 @@
3030
$warn-color: inspection.get-theme-color($theme, warn);
3131
$color-tokens: private-get-color-palette-color-tokens($theme, primary);
3232
$on-surface: if($is-dark, #fff, #000);
33-
34-
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
35-
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
36-
$on-surface: if($is-dark, #fff, #000);
37-
$text-color-base: if(m2-utils.$private-is-internal-build, $on-surface,
38-
inspection.get-theme-color($theme, foreground, text, 1));
39-
$disabled-text-color-base: if(m2-utils.$private-is-internal-build, $on-surface,
40-
inspection.get-theme-color($theme, foreground, disabled-text, 1));
41-
$divider-base: if(m2-utils.$private-is-internal-build, $on-surface,
42-
inspection.get-theme-color($theme, foreground, base));
33+
$text-color-base: inspection.get-theme-color($theme, system, on-surface);
34+
$disabled-text-color-base: inspection.get-theme-color($theme, foreground, disabled-text, 1);
35+
$divider-base: inspection.get-theme-color($theme, foreground, base);
4336

4437
@return map.merge($color-tokens, (
4538
// MDC has a token for the enabled placeholder, but not for the disabled one.

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/angular/components/commit/82ab91e58ad03207c6dfa25f5995dde1bd5760cf

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy