Skip to content

Commit 110eb19

Browse files
authored
chore(e2e): switch to Sass theme instead of prebuilt (#15690)
This is in preparation for upcoming changes to the e2e app
1 parent 457ff28 commit 110eb19

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

src/e2e-app/BUILD.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package(default_visibility=["//visibility:public"])
22

3+
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
34
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
45
load("//tools:defaults.bzl", "ng_module")
56
load("//:packages.bzl", "ANGULAR_LIBRARY_UMDS")
@@ -26,6 +27,14 @@ ng_module(
2627
],
2728
)
2829

30+
sass_binary(
31+
name = "theme",
32+
src = "theme.scss",
33+
deps = [
34+
"//src/lib/core:all_themes"
35+
]
36+
)
37+
2938
ts_devserver(
3039
name = "devserver",
3140
port = 4200,
@@ -47,6 +56,7 @@ ts_devserver(
4756
"@npm//@webcomponents/custom-elements",
4857
"//src/lib/prebuilt-themes:indigo-pink",
4958
":index.html",
59+
":theme",
5060
],
5161
# Scripts which will be included in the serving_path bundle after "require.js" has been
5262
# loaded.

src/e2e-app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<link rel="icon" type="image/x-icon" href="favicon.ico">
1010
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
1111
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
12-
<link href="angular_material/src/lib/prebuilt-themes/indigo-pink.css" rel="stylesheet">
12+
<link href="theme.css" rel="stylesheet">
1313

1414
<!-- FontAwesome for mat-icon demo. -->
1515
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

src/e2e-app/theme.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@import '../lib/core/theming/all-theme';
2+
3+
// Plus imports for other components in your app.
4+
5+
// Include the common styles for Angular Material. We include this here so that you only
6+
// have to load a single css file for Angular Material in your app.
7+
// **Be sure that you only ever include this mixin once!**
8+
@include mat-core();
9+
10+
// Define the default theme (same as the example above).
11+
$candy-app-primary: mat-palette($mat-indigo);
12+
$candy-app-accent: mat-palette($mat-pink, A200, A100, A400);
13+
$candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent);
14+
15+
// Include the default theme styles.
16+
@include angular-material-theme($candy-app-theme);

0 commit comments

Comments
 (0)