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