File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,17 @@ $candy-app-theme: mat.define-light-theme((
45
45
$dark-primary : mat .define-palette (mat .$blue-grey-palette );
46
46
$dark-accent : mat .define-palette (mat .$amber-palette , A200 , A100 , A400 );
47
47
$dark-warn : mat .define-palette (mat .$deep-orange-palette );
48
- $dark-colors : mat .define-dark-theme ($dark-primary , $dark-accent , $dark-warn );
48
+ $dark-colors : mat .define-dark-theme (
49
+ (
50
+ color : (
51
+ primary: $dark-primary ,
52
+ accent: $dark-accent ,
53
+ warn: $dark-warn
54
+ ),
55
+ density: 0 ,
56
+ typography: mat .define-typography-config (),
57
+ )
58
+ );
49
59
50
60
// Include the dark theme color styles.
51
61
@include mat .all-component-colors ($dark-colors );
@@ -55,7 +65,7 @@ $candy-app-theme: mat.define-light-theme((
55
65
56
66
// Include the dark theme colors for focus indicators.
57
67
& .demo-strong-focus {
58
- @include mat .strong-focus-indicators-theme ($dark-colors );
68
+ @include mat .strong-focus-indicators-color ($dark-colors );
59
69
}
60
70
}
61
71
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ $_legacy-theme-warning: 'Angular Material themes should be created from a map co
25
25
// comprehensive theme configurations.
26
26
$_enable-strict-theme-config : false;
27
27
28
+ // Flag whether to disable theme definitions copying color values to the top-level theme config.
29
+ // This copy is to preserve backwards compatibility.
30
+ $_disable-color-backwards-compatibility : false;
31
+
28
32
// These variable are not intended to be overridden externally. They use `!default` to
29
33
// avoid being reset every time this file is imported.
30
34
$_emitted-color : () !default ;
@@ -436,7 +440,7 @@ $_emitted-density: () !default;
436
440
// is stored in `$theme.color` which contains a property for `primary`. This method copies
437
441
// the map from `$theme.color` to `$theme` for backwards compatibility.
438
442
@function private-create-backwards-compatibility-theme ($theme ) {
439
- @if not map .get ($theme , color ) {
443
+ @if ( $_disable-color-backwards-compatibility or not map .get ($theme , color ) ) {
440
444
@return $theme ;
441
445
}
442
446
$color : map .get ($theme , color );
You can’t perform that action at this time.
0 commit comments