Skip to content

Commit

Permalink
fix(material-experimental/theming): incorrect validation for density …
Browse files Browse the repository at this point in the history
…scale

We were missing a comma in the list of allowed densities which was breaking the validation.
  • Loading branch information
crisbeto committed Jan 11, 2024
1 parent d16e8ac commit 935eda0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dev-app/theme-m3.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ html {
}

// Emit density styles for each scale.
@each $scale in (maximum, 0, -1, -2, -3, minimum) {
@each $scale in (maximum, 0, -1, -2, -3, -4, minimum) {
$scale-theme: matx.define-theme(map.set($m3-base-config, density, scale, $scale));

.demo-density-#{$scale} {
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/theming/_config-validation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
@return (#{'$config has unexpected properties. Valid properties are: scale. Found:'} $err);
}
@if $config and map.has-key($config, scale) {
$allowed-scales: (0, -1, -2, -3, -4 -5, minimum, maximum);
$allowed-scales: (0, -1, -2, -3, -4, -5, minimum, maximum);
@if mat.private-validate-allowed-values(map.get($config, scale), $allowed-scales...) {
@return (
#{'Expected $config.scale to be one of: #{$allowed-scales}. Got:'}
Expand Down

0 comments on commit 935eda0

Please sign in to comment.