File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 24
24
@use ' ../style/sass-utils' ;
25
25
@use ' ./m2' ;
26
26
@use ' ./m3' ;
27
+ @use ' sass:list' ;
27
28
@use ' sass:map' ;
28
29
@use ' sass:meta' ;
29
30
328
329
' configs created with define-light-theme or define-dark-theme' ;
329
330
}
330
331
332
+ // Check whether any override keys do not match keys in the theme
333
+ // config system map.
334
+ $invalid-keys : ();
335
+ $config-system : map .get ($theme-config , _mat-system );
336
+ @each $key , $value in $overrides {
337
+ @if (not map .has-key ($config-system , $key )) {
338
+ $invalid-keys : list .append ($invalid-keys , $key );
339
+ }
340
+ }
341
+ @if (list .length ($invalid-keys ) > 0 ) {
342
+ @error ' The following overrides are not valid system variables: #{$invalid-keys } . ' +
343
+ ' Valid keys are: #{map .keys ($config-system )} ' ;
344
+ }
345
+
331
346
$config : m2-inspection .get-m2-config ($theme-config );
332
347
333
348
$color : map .get ($config , color );
You can’t perform that action at this time.
0 commit comments