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(ThemePalette): ThemePalette for Material 3 #28902

Closed
1 task
seneric opened this issue Apr 18, 2024 · 2 comments
Closed
1 task

bug(ThemePalette): ThemePalette for Material 3 #28902

seneric opened this issue Apr 18, 2024 · 2 comments
Assignees
Labels
needs triage This issue needs to be triaged by the team

Comments

@seneric
Copy link

seneric commented Apr 18, 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

No response

Description

Currently in some components (radio-button for example) the color is typed themePalette.
But themePalette only allows 'primary', 'accent' and 'warn' colors.
So if we try to use it with a Material 3 palette it is not possible to specify a 'primary', 'secondary', 'tertiary' and 'error' color.

color.ts contain
`/** Possible color palette values. */

export type ThemePalette = 'primary' | 'accent' | 'warn' | undefined;`

Reproduction

StackBlitz link:
Steps to reproduce:
1.
2.

Expected Behavior

ThemePalette Marerial 3 compatible

Actual Behavior

ThemePalette only Marerial 2 compatible

Environment

  • Angular: 17.3.1
  • CDK/Material: 17.3.1
  • Browser(s): all
  • Operating System (e.g. Windows, macOS, Ubuntu): all
@seneric seneric added the needs triage This issue needs to be triaged by the team label Apr 18, 2024
@amysorto
Copy link
Contributor

amysorto commented May 8, 2024

Colors are different in M3, the spec has a whole new color system (https://m3.material.io/styles/color/roles). For example, accent does not exist in M3.

We have a mixin for backwards compatability that I would recommend taking a look at so you can keep your existing color variants but get to use M3: https://material.angular.io/guide/material-3#optional-add-backwards-compatibility-styles-for-color-variants

@amysorto amysorto closed this as completed May 8, 2024
@seneric
Copy link
Author

seneric commented May 9, 2024

I know the "backwards compatability" mixin I use it !
But I want to develop a new full M3 compatability web site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

3 participants