15
15
16
16
// Plus imports for other components in your app.
17
17
18
- // Include the common styles for Angular Material. We include this here so that you only
19
- // have to load a single css file for Angular Material in your app.
20
- // **Be sure that you only ever include this mixin once!**
21
- @include mat-core ();
22
- @include angular-material-mdc-typography (mat-mdc-typography-config ());
23
- @include mat-popover-edit-typography (mat-typography-config ());
24
-
25
- // Include base styles for strong focus indicators.
26
- .demo-strong-focus {
27
- @include mat-strong-focus-indicators ();
28
- @include mat-mdc-strong-focus-indicators ();
29
- }
30
-
31
- // Define the default theme (same as the example above).
18
+ // Define the default (light) theme.
32
19
$candy-app-primary : mat-palette ($mat-indigo );
33
20
$candy-app-accent : mat-palette ($mat-pink , A200 , A100 , A400 );
34
21
$candy-app-theme : mat-light-theme ((
35
- color : (
36
- primary: $candy-app-primary ,
37
- accent: $candy-app-accent
38
- )
22
+ // Define the default colors for our app.
23
+ color : (
24
+ primary: $candy-app-primary ,
25
+ accent: $candy-app-accent
26
+ ),
27
+ // Define the default typography for our app.
28
+ typography: mat-mdc-typography-config (),
29
+ // Define the default density level for our app.
30
+ density: 0 ,
39
31
));
40
32
33
+ // Include the common styles for Angular Material. We include this here so that you only
34
+ // have to load a single css file for Angular Material in your app.
35
+ // **Be sure that you only ever include this mixin once!**
36
+ @include mat-core ($candy-app-theme );
37
+
41
38
// Include the default theme styles.
42
39
@include angular-material-theme ($candy-app-theme );
43
40
@include angular-material-mdc-theme ($candy-app-theme );
44
41
@include mat-column-resize-theme ($candy-app-theme );
45
42
@include mat-popover-edit-theme ($candy-app-theme );
46
-
47
43
// We add this in manually for now, because it isn't included in `angular-material-mdc-theme`.
48
44
@include mat-mdc-slider-theme ($candy-app-theme );
49
45
50
- // Define an alternate dark theme.
51
- $dark-primary : mat-palette ($mat-blue-grey );
52
- $dark-accent : mat-palette ($mat-amber , A200 , A100 , A400 );
53
- $dark-warn : mat-palette ($mat-deep-orange );
54
- $dark-theme : mat-dark-theme ((
55
- color : (
56
- primary: $dark-primary ,
57
- accent: $dark-accent ,
58
- warn: $dark-warn
59
- )
60
- ));
61
-
62
- // Include the default theme for focus indicators.
63
46
.demo-strong-focus {
47
+ // Include base styles for strong focus indicators.
48
+ @include mat-strong-focus-indicators ();
49
+ @include mat-mdc-strong-focus-indicators ();
50
+
51
+ // Include the default theme for focus indicators.
64
52
@include mat-strong-focus-indicators-theme ($candy-app-theme );
65
53
@include mat-mdc-strong-focus-indicators-theme ($candy-app-theme );
66
54
}
@@ -70,17 +58,25 @@ $dark-theme: mat-dark-theme((
70
58
// `.demo-unicorn-dark-theme` will be affected by this alternate dark theme instead of the
71
59
// default theme.
72
60
.demo-unicorn-dark-theme {
73
- @include angular-material-color ($dark-theme );
74
- @include angular-material-mdc-color ($dark-theme );
75
- @include mat-column-resize-color ($dark-theme );
76
- @include mat-popover-edit-color ($dark-theme );
77
- @include mat-mdc-slider-color ($dark-theme );
78
- }
61
+ // Create the color palettes used in our dark theme.
62
+ $dark-primary : mat-palette ($mat-blue-grey );
63
+ $dark-accent : mat-palette ($mat-amber , A200 , A100 , A400 );
64
+ $dark-warn : mat-palette ($mat-deep-orange );
65
+ $dark-colors : mat-dark-theme ($dark-primary , $dark-accent , $dark-warn );
79
66
80
- // Include the dark theme for focus indicators.
81
- .demo-unicorn-dark-theme.demo-strong-focus {
82
- @include mat-strong-focus-indicators-color ($dark-theme );
83
- @include mat-mdc-strong-focus-indicators-color ($dark-theme );
67
+ // Include the dark theme color styles.
68
+ @include angular-material-color ($dark-colors );
69
+ @include angular-material-mdc-color ($dark-colors );
70
+ @include mat-column-resize-color ($dark-colors );
71
+ @include mat-popover-edit-color ($dark-colors );
72
+ // We add this in manually for now, because it isn't included in `angular-material-mdc-theme`.
73
+ @include mat-mdc-slider-color ($dark-colors );
74
+
75
+ // Include the dark theme colors for focus indicators.
76
+ .demo-strong-focus {
77
+ @include mat-strong-focus-indicators-color ($dark-colors );
78
+ @include mat-mdc-strong-focus-indicators-color ($dark-colors );
79
+ }
84
80
}
85
81
86
82
// Create classes for all density scales which are supported by all MDC-based components.
0 commit comments