Components: mat-expansion-panel-header :hover style sticks after expansion

Created on 8 Nov 2018  路  3Comments  路  Source: angular/components

Bug, feature request, or proposal:

If you use a custom style for the header, the hover style should go away after you click to expand a panel and mouse away.

What is the expected behavior?

After expanding the original style returns

What is the current behavior?

When you mouse over the header to expand, the hover style is applied. When you expand and mouse away it stays until you click something else or perform some other sort of action on the page.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-ojcyga

Is there anything else we should know?

Maybe this is not how you are intended to override the default style. If so I'm not sure how that might be made more clear.

P3

Most helpful comment

I found a simple workaround by setting the header background colors to !important

.header {
  background-color: #e4e1df !important;
}

.header:hover {
  background-color: #ffcb05 !important;
}

All 3 comments

I found a simple workaround by setting the header background colors to !important

.header {
  background-color: #e4e1df !important;
}

.header:hover {
  background-color: #ffcb05 !important;
}

Closing since this is an issue with the custom styling, rather than Material.

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anderflash picture anderflash  路  59Comments

jelbourn picture jelbourn  路  132Comments

jeffbcross picture jeffbcross  路  126Comments

jmcgoldrick picture jmcgoldrick  路  59Comments

Daugoh picture Daugoh  路  79Comments