-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(material/core): theming validation for m2 themes firing incorrectly #28707
Conversation
Fixes that theming validation for M2 themes was firing incorrectly, because the validation code was going through the `get-color-config`, `get-density-config` and `get-typography-config` functions which in turn were reading the internalized version of the theme where all the values were the same. Since Sass maps are immutable, they were being compared based on their values and always considered as the same theme.
$color-config: get-color-config($theme); | ||
$density-config: get-density-config($theme); | ||
$typography-config: get-typography-config($theme); | ||
$color-config: map.get($theme, $_internals, m2-config, color) or get-color-config($theme); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could expose this function internally if you want: https://github.com/angular/components/blob/main/src/material/core/theming/_m2-inspection.scss#L44, would probably make the logic here slightly simpler. Though this is fine too
…ly (#28707) Fixes that theming validation for M2 themes was firing incorrectly, because the validation code was going through the `get-color-config`, `get-density-config` and `get-typography-config` functions which in turn were reading the internalized version of the theme where all the values were the same. Since Sass maps are immutable, they were being compared based on their values and always considered as the same theme. (cherry picked from commit e524567)
…ly (#28707) Fixes that theming validation for M2 themes was firing incorrectly, because the validation code was going through the `get-color-config`, `get-density-config` and `get-typography-config` functions which in turn were reading the internalized version of the theme where all the values were the same. Since Sass maps are immutable, they were being compared based on their values and always considered as the same theme. (cherry picked from commit e524567)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes that theming validation for M2 themes was firing incorrectly, because the validation code was going through the
get-color-config
,get-density-config
andget-typography-config
functions which in turn were reading the internalized version of the theme where all the values were the same. Since Sass maps are immutable, they were being compared based on their values and always considered as the same theme.