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(material/table): mouse hover not working with indigo & pink #26203

Open
3 of 4 tasks
mrmokwa opened this issue Dec 7, 2022 · 2 comments
Open
3 of 4 tasks

bug(material/table): mouse hover not working with indigo & pink #26203

mrmokwa opened this issue Dec 7, 2022 · 2 comments
Labels
area: material/table P2 The issue is important to a large percentage of users, with a workaround

Comments

@mrmokwa
Copy link

mrmokwa commented Dec 7, 2022

Description

Animation

You can check at the table examples in material.io:
https://material.angular.io/components/table/examples

  • Deep-purple & Amber
  • Indigo & Pink
  • Pink & Blue-Grey
  • Purple & Green

The talbe hovering effect doesn't work with Indigo & Pink theme.
Custom light-theme seens to not being working too.

Example:
image

Reproduction

Steps to reproduce:

  1. Select in material.io table examples the indigo and pink theme
  2. Hover over the row and nothing happens.
  3. Select in material.io table examples the deeo purple and amber theme
  4. Hover over the row, and the styling is applied.

Environment

  • Angular: 15
  • CDK/Material: 15
  • Browser(s): Chrome and Firefox
@mrmokwa mrmokwa added the needs triage This issue needs to be triaged by the team label Dec 7, 2022
@ChristofferGersen
Copy link

I expect the hover not to be visible, given the following lines from table.scss

// Disable hover styling while MDC uses an opacity for its color.
// When the hover style is used with sticky cells, the opacity shows the cells overlapping.
.mat-mdc-table .mat-mdc-row:hover,
.mat-mdc-table .mat-mdc-footer-row:hover {
  background-color: inherit;
}

This does not always work, since it has the same specificity als the mdc theme selector:
.mdc-data-table__row:not(.mdc-data-table__row--selected):hover

As a result the styles apply in declaration/load order. "Indigo & Pink" is probably the default theme, and the other themes are loaded later on demand. Since loading another theme does not include table.scss again, the mdc theme will enable mouse hover again.

@dkimmich-onventis
Copy link

I'm facing the same issue, but with a custom theme. In my case there is no hover effect in the development server, but in production there is one.

@wagnermaciel wagnermaciel added P2 The issue is important to a large percentage of users, with a workaround area: material/table and removed needs triage This issue needs to be triaged by the team labels Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/table P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

No branches or pull requests

4 participants