Skip to content

bug(button): FAB buttons cannot be unthemed anymore #26218

Open

Description

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

14

Description

In v15, to put [color]="undefined" on a FAB or mini FAB button doesn't work anymore to get an unthemed FAB or mini FAB button.

Even by providing {} as MAT_FAB_DEFAULT_OPTIONS, the accent color still gets applied by default because of all of the || defaults.color in fab.ts (so removing the 4 of them is a possible solution according to my tests).

Reproduction

https://stackblitz.com/edit/unthemed-fab-buttons-15?file=src/app/app.component.html

Expected Behavior

https://stackblitz.com/edit/unthemed-fab-buttons-14?file=src/app/app.component.html

Actual Behavior

https://stackblitz.com/edit/unthemed-fab-buttons-15?file=src/app/app.component.html

Environment

  • Angular: 15.0.2
  • CDK/Material: 15.0.1
  • Browser(s): Firefox
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/buttonneeds: discussionFurther discussion with the team is needed before proceeding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions