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 2424@use ' ../style/sass-utils' ;
2525@use ' ./m2' ;
2626@use ' ./m3' ;
27+ @use ' sass:list' ;
2728@use ' sass:map' ;
2829@use ' sass:meta' ;
2930
328329 ' configs created with define-light-theme or define-dark-theme' ;
329330 }
330331
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+
331346 $config : m2-inspection .get-m2-config ($theme-config );
332347
333348 $color : map .get ($config , color );
You can’t perform that action at this time.
0 commit comments