angular / angular/components

docs-bug(*): Missing migration guide to v19

Offen
#30,055 18 Kommentare 34 Reaktionen 1 zugewiesene Person Beansprucht von @andrewseguin Auf GitHub ansehen
docs needs: discussion
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

### 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:

> Note: I'm trying to remove the old `$theme = mat.define-theme(...)` to use the new `@include mat.theme` mixins

## Styling custom components
### Before
```
.my-component {
background-color: mat.get-theme-color(theme.$theme, neutral, 98)
}
```
### 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
```
@include mat.core();
:root {
@include mat.core-theme(theme.$light-theme);
}
```

### After
It has been automatically replaced to:

```
@include mat.elevation-classes();
@include mat.app-background();
:root {
@include mat.elevation-classes();
@include mat.app-background();
}
```
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:
```
@include mat.chips-color(theme.$theme, $color-variant: primary);
@include mat.form-field-density(-3);
```

### 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.