Skip to content

docs-bug(theming): Mention Importing Prebuilt Themes for M3 Support #29152

Closed
@ajaygandecha

Description

@ajaygandecha

Documentation Feedback

In upgrading my site using Angular Material v16 to v18, I noticed that many of my new components adopted the new M3 styling, however the mat-chip component did not. In this site, I used mat.define-theme to create a theme using the $violet-palette and everything was working well, except the chip component carried the same style from M2.

After a while of researching, I found that my angular.json file includes prebuilt-themes/ indigo-pink.css in styles, which based on #28779, appears to not have been updated for M3. Switching my import statement to prebuilt-themes/magenta-violet.css fixed the issue, and now mat-chip has the correct styling.

I may have just been approaching fixing the problem incorrectly (or perhaps my styling setup is not correct), but I think that mentioning which prebuilt themes work for M3 somewhere in the documentation would be extremely helpful, especially for those upgrading their site to Angular Material v18 from an older version, or for someone starting out!

Affected documentation page

https://material.angular.io/guide/theming#defining-a-theme

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: themingdocsThis issue is related to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions