Skip to content

Commit 64619a9

Browse files
devversionjelbourn
authored andcommitted
build: universal-app theme should use mdc-theming and mdc-typography mixins (#16994)
Instead of bringing in all theme and typography mixins manually, the dev-app should use the mdc-theming and mdc-typography mixins.
1 parent 8f6171d commit 64619a9

File tree

2 files changed

+8
-31
lines changed

2 files changed

+8
-31
lines changed

src/universal-app/BUILD.bazel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
22

33
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_test")
44
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
5-
load("//:packages.bzl", "CDK_EXPERIMENTAL_TARGETS", "CDK_TARGETS", "MATERIAL_EXPERIMENTAL_SCSS_LIBS", "MATERIAL_EXPERIMENTAL_TARGETS", "MATERIAL_TARGETS")
5+
load("//:packages.bzl", "CDK_EXPERIMENTAL_TARGETS", "CDK_TARGETS", "MATERIAL_EXPERIMENTAL_TARGETS", "MATERIAL_TARGETS")
66
load("//tools:defaults.bzl", "ng_module", "ts_library")
77

88
ng_module(
@@ -42,8 +42,10 @@ sass_binary(
4242
"external/npm/node_modules",
4343
],
4444
deps = [
45+
"//src/material-experimental/mdc-theming:all_themes",
46+
"//src/material-experimental/mdc-typography:all_typography",
4547
"//src/material/core:all_themes",
46-
] + MATERIAL_EXPERIMENTAL_SCSS_LIBS,
48+
],
4749
)
4850

4951
nodejs_test(

src/universal-app/theme.scss

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,14 @@
11
@import '../material/core/theming/all-theme';
2-
@import '../material-experimental/mdc-button/mdc-button';
3-
@import '../material-experimental/mdc-card/mdc-card';
4-
@import '../material-experimental/mdc-checkbox/mdc-checkbox';
5-
@import '../material-experimental/mdc-chips/mdc-chips';
6-
@import '../material-experimental/mdc-helpers/mdc-helpers';
7-
@import '../material-experimental/mdc-menu/mdc-menu';
8-
@import '../material-experimental/mdc-radio/mdc-radio';
9-
@import '../material-experimental/mdc-slide-toggle/mdc-slide-toggle';
10-
@import '../material-experimental/mdc-tabs/mdc-tabs';
2+
@import '../material-experimental/mdc-theming/all-theme';
3+
@import '../material-experimental/mdc-typography/all-typography';
114

125
// Plus imports for other components in your app.
136

147
// Include the common styles for Angular Material. We include this here so that you only
158
// have to load a single css file for Angular Material in your app.
169
// **Be sure that you only ever include this mixin once!**
1710
@include mat-core();
18-
@include mat-button-typography-mdc(mat-typography-config());
19-
@include mat-icon-button-typography-mdc(mat-typography-config());
20-
@include mat-fab-typography-mdc(mat-typography-config());
21-
@include mat-card-typography-mdc(mat-typography-config());
22-
@include mat-checkbox-typography-mdc(mat-typography-config());
23-
@include mat-chips-typography-mdc(mat-typography-config());
24-
@include mat-menu-typography-mdc(mat-typography-config());
25-
@include mat-radio-typography-mdc(mat-typography-config());
26-
@include mat-slide-toggle-typography-mdc(mat-typography-config());
27-
@include mat-tabs-typography-mdc(mat-typography-config());
11+
@include angular-material-typography-mdc();
2812

2913
// Define the default theme (same as the example above).
3014
$candy-app-primary: mat-palette($mat-indigo);
@@ -33,13 +17,4 @@ $candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent);
3317

3418
// Include the default theme styles.
3519
@include angular-material-theme($candy-app-theme);
36-
@include mat-button-theme-mdc($candy-app-theme);
37-
@include mat-icon-button-theme-mdc($candy-app-theme);
38-
@include mat-fab-theme-mdc($candy-app-theme);
39-
@include mat-card-theme-mdc($candy-app-theme);
40-
@include mat-checkbox-theme-mdc($candy-app-theme);
41-
@include mat-chips-theme-mdc($candy-app-theme);
42-
@include mat-menu-theme-mdc($candy-app-theme);
43-
@include mat-radio-theme-mdc($candy-app-theme);
44-
@include mat-slide-toggle-theme-mdc($candy-app-theme);
45-
@include mat-tabs-theme-mdc($candy-app-theme);
20+
@include angular-material-theme-mdc($candy-app-theme);

0 commit comments

Comments
 (0)