-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
docs-bug(*): Missing migration guide to v19 #30055
Comments
This is not only an issue when you want to migrate to the new |
And while this is not related to documentation, may I also suggest to keep the scss in |
Thanks for the feedback. Our previous theme config system was fairly complex and required a deep guide on its mechanics. We're hoping this new system is more straightforward with how it operates, but this means the guide might feel more lightweight than before. Styling custom componentsIn the same pattern of system CSS variables, I'd recommend simply creating a top-level CSS variable for colors you want to use within your application. E.g.
This bypasses the need to create a separate mixin in your component styles that accepts a theme config, and allows you to just put the style directly in your component style. If you want to continue using the mixin concept, you can pass it the palette or color directly. Otherwise, you can always continue creating a theme config that can be passed around, in parallel to using Material 3 theme setup
For a new app, we don't really recommend using Customizing material componentsWhat are you trying to achieve in the line for chips-color? Isn't the default going to be primary? If you are trying to set it with a different color, you can write a selector that targets your mat-chips and redefine the theme as described in https://material.angular.io/guide/theming#context-specific-themes This applies for density as well - you can target the form field and call
However, the |
If this wasn't the case, it'd be helpful to have an issue filed. Our intention is to keep the same behavior/styling preserved for applications in the update process |
Thanks @andrewseguin for your response, it has helped me a lot, but I still have a few issues: Styling custom componentsFor color, replacing And for other styles, for example typography, I was used to do:
and now I should do the following (as described here)
Am I right? It is regrettable that reading theme styles does not follow the same rule as overriding styles, such as:
It would be great to have public APIs to rely on instead of CSS variables that cannot be checked during compilation. Material 3 theme setupI'll file a new issue for Customizing material components
What you suggested do not work for me. I have:
It has no effect, no CSS properties have beean generated.
Is there any way to generate only component related properties? Also, now I need to specify every kind of chips (mat-chip, mat-chip-row and mat-chip-option) and rely on private CSS class or material host tag, both of which can change in the future and are not checked at compile time. Is there any other solution? |
It's not obvious to me how to handle typography for non-component styles. The default styles of |
Documentation Feedback
I'm struggling to migrate from Angular Material v18 (with MD3) to v19. I did not find any migration guide and the new guides do not explain the basics as deeply as in the previous version.
Here are the most important use cases that I don't know how to deal with:
Styling custom components
Before
After
I cannot use mat.get-theme-color because I don't have a $theme anymore (previously from mat.define-theme). How can I do that?
Material 3 theme setup
Before
After
It has been automatically replaced to:
What is it for? Why isn't it present if I create a new application with Angular Material? Should it be duplicated? I don't see any documentation mentioning those mixins.
Customising material components
Before
I could do this:
After
How to do the same? Do I need to use the new overrides mixins and set each color tokens? For example, that would be 25 colors for the chip component.
Affected documentation page
https://material.angular.io/guide/theming
The text was updated successfully, but these errors were encountered: