@@ -109,10 +109,10 @@ $_mat-theme-emitted-density: () !default;
109
109
@return (
110
110
primary: $primary ,
111
111
accent: $accent ,
112
- warn: if ($warn != null , $warn , palette (palette .$red )),
112
+ warn: if ($warn != null , $warn , palette (palette .$mat- red )),
113
113
is- dark: false,
114
- foreground: palette .$light-theme-foreground ,
115
- background : palette .$light-theme-background ,
114
+ foreground: palette .$mat- light-theme-foreground ,
115
+ background : palette .$mat- light-theme-background ,
116
116
);
117
117
}
118
118
@@ -122,17 +122,17 @@ $_mat-theme-emitted-density: () !default;
122
122
@return (
123
123
primary: $primary ,
124
124
accent: $accent ,
125
- warn: if ($warn != null , $warn , palette (palette .$red )),
125
+ warn: if ($warn != null , $warn , palette (palette .$mat- red )),
126
126
is- dark: true,
127
- foreground: palette .$dark-theme-foreground ,
128
- background : palette .$dark-theme-background ,
127
+ foreground: palette .$mat- dark-theme-foreground ,
128
+ background : palette .$mat- dark-theme-background ,
129
129
);
130
130
}
131
131
132
132
// Creates a container object for a light theme to be given to individual component theme mixins.
133
133
// TODO: Remove legacy API and rename `$primary` to `$config`. Currently it cannot be renamed
134
134
// as it would break existing apps that set the parameter by name.
135
- @function light-theme ($primary , $accent : null , $warn : palette (palette .$red )) {
135
+ @function light-theme ($primary , $accent : null , $warn : palette (palette .$mat- red )) {
136
136
// This function creates a container object for the individual component theme mixins. Consumers
137
137
// can construct such an object by calling this function, or by building the object manually.
138
138
// There are two possible ways to invoke this function in order to create such an object:
@@ -169,7 +169,7 @@ $_mat-theme-emitted-density: () !default;
169
169
// Creates a container object for a dark theme to be given to individual component theme mixins.
170
170
// TODO: Remove legacy API and rename `$primary` to `$config`. Currently it cannot be renamed
171
171
// as it would break existing apps that set the parameter by name.
172
- @function dark-theme ($primary , $accent : null , $warn : palette (palette .$red )) {
172
+ @function dark-theme ($primary , $accent : null , $warn : palette (palette .$mat- red )) {
173
173
// This function creates a container object for the individual component theme mixins. Consumers
174
174
// can construct such an object by calling this function, or by building the object manually.
175
175
// There are two possible ways to invoke this function in order to create such an object:
@@ -339,15 +339,14 @@ $_mat-theme-emitted-density: () !default;
339
339
// styles **once** and at root. This matches the old behavior where density styles were
340
340
// part of the base component styles (that did not use view encapsulation).
341
341
// TODO: Remove this compatibility logic when the legacy theming API is removed.
342
- $mat-private- density-generate-at-root : is-legacy-constructed-theme ($theme );
343
- $mat-private- density-generate-styles : not $duplicate-legacy-density ;
342
+ compatibility . $ density-generate-at-root : is-legacy-constructed-theme ($theme );
343
+ compatibility . $ density-generate-styles : not $duplicate-legacy-density ;
344
344
345
345
@content ;
346
346
$theme-ignore-duplication-warnings : $orig-mat-theme-ignore-duplication-warnings !global;
347
347
348
- // TODO: after the migration is finished, these need to refer to the `compatibility` import.
349
- $mat-private-density-generate-at-root : false;
350
- $mat-private-density-generate-styles : true;
348
+ compatibility .$density-generate-at-root : false;
349
+ compatibility .$density-generate-styles : true;
351
350
}
352
351
353
352
// Checks whether the given value resolves to a theme object. Theme objects are always
0 commit comments