Skip to content

bug(button): mat-icon-button vs mat-button hover inconsistency #29456

Closed
@blogcraft

Description

@blogcraft

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

No response

Description

I have a Tool Bar with 3 icons, 2 mat-icon-button and one mat-button:
image

When Hovering, the background color is different and inconsistent.

mat-button hover has a hint of the theme color:
image
image
image

mat-icon-button only has some opacity with a state layer color that ignores the theme.
image
image

Why this inconsistency?

Reproduction

StackBlitz link: Could not make one
Steps to reproduce:

  1. Create a
  2. Inside create a mat-button and a mat-menu-item
  3. Icons are optional

Expected Behavior

I expect the same behaviour for both buttons.

Actual Behavior

They have different hover background colors.

Environment

  • Angular: 18.1.0
  • CDK/Material: 18.1.0
  • Browser(s): MS Edge
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions