Skip to content

Commit 73f5a5f

Browse files
authored
build: add all prebuilt themes to experimental (#24142)
Adds the same set of prebuilt themes to experimental as in the stable package.
1 parent 9b437ed commit 73f5a5f

File tree

5 files changed

+120
-0
lines changed

5 files changed

+120
-0
lines changed

src/material-experimental/mdc-theming/BUILD.bazel

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ filegroup(
66
name = "mdc-theming",
77
srcs = [
88
":all_themes",
9+
":deeppurple_amber_prebuilt",
910
":indigo_pink_prebuilt",
11+
":pink_bluegrey_prebuilt",
12+
":purple_green_prebuilt",
1013
],
1114
)
1215

@@ -54,3 +57,39 @@ sass_binary(
5457
"//src/material-experimental/mdc-typography:all_typography",
5558
],
5659
)
60+
61+
sass_binary(
62+
name = "deeppurple_amber_prebuilt",
63+
src = "prebuilt/deeppurple-amber.scss",
64+
include_paths = [
65+
"external/npm/node_modules",
66+
],
67+
deps = [
68+
":all_themes",
69+
"//src/material-experimental/mdc-typography:all_typography",
70+
],
71+
)
72+
73+
sass_binary(
74+
name = "pink_bluegrey_prebuilt",
75+
src = "prebuilt/pink-bluegrey.scss",
76+
include_paths = [
77+
"external/npm/node_modules",
78+
],
79+
deps = [
80+
":all_themes",
81+
"//src/material-experimental/mdc-typography:all_typography",
82+
],
83+
)
84+
85+
sass_binary(
86+
name = "purple_green_prebuilt",
87+
src = "prebuilt/purple-green.scss",
88+
include_paths = [
89+
"external/npm/node_modules",
90+
],
91+
deps = [
92+
":all_themes",
93+
"//src/material-experimental/mdc-typography:all_typography",
94+
],
95+
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@use '../all-theme';
2+
@use '../../../material/core/core';
3+
@use '../../../material/core/core-theme';
4+
@use '../../../material/core/theming/palette';
5+
@use '../../../material/core/theming/theming';
6+
@use '../../../material/core/typography/typography';
7+
8+
// Define a theme.
9+
$primary: theming.define-palette(palette.$deep-purple-palette);
10+
$accent: theming.define-palette(palette.$amber-palette, A200, A100, A400);
11+
12+
$theme: (
13+
color: theming.define-light-theme($primary, $accent),
14+
// TODO(mmalerba): Update to `mat-mdc-typography-config()` once non-MDC components can handle
15+
// 2018 configs.
16+
typography: typography.define-typography-config()
17+
);
18+
19+
// Include non-theme styles for core.
20+
@include core.core($theme);
21+
22+
// Include all theme styles for the components.
23+
@include core-theme.theme($theme);
24+
@include all-theme.all-mdc-component-themes($theme);
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@use '../all-theme';
2+
@use '../../../material/core/core';
3+
@use '../../../material/core/core-theme';
4+
@use '../../../material/core/theming/palette';
5+
@use '../../../material/core/theming/theming';
6+
@use '../../../material/core/typography/typography';
7+
8+
// Define a theme.
9+
$primary: theming.define-palette(palette.$pink-palette, 700, 500, 900);
10+
$accent: theming.define-palette(palette.$blue-grey-palette, A200, A100, A400);
11+
12+
$theme: (
13+
color: theming.define-dark-theme($primary, $accent),
14+
// TODO(mmalerba): Update to `mat-mdc-typography-config()` once non-MDC components can handle
15+
// 2018 configs.
16+
typography: typography.define-typography-config()
17+
);
18+
19+
// Include non-theme styles for core.
20+
@include core.core($theme);
21+
22+
// Include all theme styles for the components.
23+
@include core-theme.theme($theme);
24+
@include all-theme.all-mdc-component-themes($theme);
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@use '../all-theme';
2+
@use '../../../material/core/core';
3+
@use '../../../material/core/core-theme';
4+
@use '../../../material/core/theming/palette';
5+
@use '../../../material/core/theming/theming';
6+
@use '../../../material/core/typography/typography';
7+
8+
// Define a theme.
9+
$primary: theming.define-palette(palette.$purple-palette, 700, 500, 800);
10+
$accent: theming.define-palette(palette.$green-palette, A200, A100, A400);
11+
12+
$theme: (
13+
color: theming.define-dark-theme($primary, $accent),
14+
// TODO(mmalerba): Update to `mat-mdc-typography-config()` once non-MDC components can handle
15+
// 2018 configs.
16+
typography: typography.define-typography-config()
17+
);
18+
19+
// Include non-theme styles for core.
20+
@include core.core($theme);
21+
22+
// Include all theme styles for the components.
23+
@include core-theme.theme($theme);
24+
@include all-theme.all-mdc-component-themes($theme);

src/material-experimental/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
"./mdc-theming/prebuilt/indigo-pink.css": {
1919
"style": "./mdc-theming/prebuilt/indigo-pink.css"
2020
},
21+
"./mdc-theming/prebuilt/deeppurple-amber.css": {
22+
"style": "./mdc-theming/prebuilt/deeppurple-amber.css"
23+
},
24+
"./mdc-theming/prebuilt/pink-bluegrey.css": {
25+
"style": "./mdc-theming/prebuilt/pink-bluegrey.css"
26+
},
27+
"./mdc-theming/prebuilt/purple-green.css": {
28+
"style": "./mdc-theming/prebuilt/purple-green.css"
29+
},
2130
"./mdc-theming/prebuilt/*": {
2231
"style": "./mdc-theming/prebuilt/*.css"
2332
}

0 commit comments

Comments
 (0)