Skip to content
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(MatButton): Button ripple effect doesn't support custom theme with CSS variables #28384

Closed
1 task done
harshainative opened this issue Jan 8, 2024 · 3 comments
Closed
1 task done
Labels
needs triage This issue needs to be triaged by the team

Comments

@harshainative
Copy link

harshainative commented Jan 8, 2024

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

15.2.8

Description

Ripple effect on buttons when using CSS variables to load palettes doesn't have opacity.
This issue was fixed in the discussion below.
#16652

Reproduction

StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-moeuaj?file=src%2Fmain.ts
Steps to reproduce:

  1. Click on the blue button which has color loaded from palette based on CSS variables (to support dynamic theming).

Expected Behavior

Ripple effect should be rendered with opacity.

Actual Behavior

Ripple effect shows the color without opacity.

Environment

  • Angular: 17.0.6
  • CDK/Material: 17.0.4
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@harshainative harshainative added the needs triage This issue needs to be triaged by the team label Jan 8, 2024
@crisbeto
Copy link
Member

crisbeto commented Jan 8, 2024

Setting up palettes with variables like this has never been supported. See the discussion in #25981.

@crisbeto crisbeto closed this as completed Jan 8, 2024
@harshainative
Copy link
Author

harshainative commented Jan 8, 2024

Thank you for the reply. Though the loading of themes via CSS variables might not be officially supported, it was working in @angular/material@15.2.8. I have created an example which is same as the one shared in the bug report but using material@15.2.8. The ripple effect is working perfectly in this example. Could you please have a look at it.

https://stackblitz.com/edit/stackblitz-starters-76nppp?file=src%2Fmain.ts

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

2 participants