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
bug(progress-bar): css vars do not work right with custom theme #27636
Comments
I am no CSS expert but wanted to look into this a bit, from what I can tell there is no way to determine the type of what is stored in a custom property (css var), this means that we either cannot use css variables (which I am not sure is an option for us) or components/src/material/core/tokens/m2/mdc/_linear-progress.scss Lines 30 to 41 in f7e3ae3
Maybe another CSS expert knows more than me about this can we can actually check the type of what is stored in a custom property rather than checking the custom property itself. |
I have a similar issue #27689 |
Closing as a duplicate of #25981. |
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. |
Is this a regression?
The previous version in which this bug was not present was
No response
Description
when setting up a custom theme like this
Causes the progress bar to be the same color for the filled and buffer (track). It ends up use the
500
for the MDC components, this was working with the legacy components perfectly fine (setting the css vars the same way as before). The legacy components use500
for filled and100
for the buffer.We think it is related to
components/src/material/core/tokens/m2/mdc/_linear-progress.scss
Lines 30 to 41 in f7e3ae3
500
to just a hex value instead of a css var then it works right.Reference:
Me and Matthieu discussing it https://angular-team.slack.com/archives/C08M4JKNH/p1691790798360909
Reproduction
StackBlitz link: https://stackblitz.com/edit/components-issue-hrsxmj?file=src%2Fstyles.scss
Steps to reproduce: See description
Expected Behavior
Should be able to use CSS vars to define the different colors in a palette
Actual Behavior
CSS vars cause the background color (in progress bar that is the buffer) to be set to the same value as the main color (
500
at least for the progress bar)Environment
The text was updated successfully, but these errors were encountered: