File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/material/core/theming Expand file tree Collapse file tree 1 file changed +5
-1
lines changed 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