File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -1090,9 +1090,24 @@ for how to read values from an M3 theme).
10901090
10911091### Pass a new M3 theme in your global theme styles
10921092
1093- Create a new M3 theme object using ` define-theme ` and pass it everywhere you were previously passing
1094- your M2 theme. All Angular Material mixins that take an M2 theme are compatible with M3 themes as
1095- well.
1093+ Replace your M2 theme with an M3 theme. For v19 and later, use the ` mat.theme `
1094+ mixin as described in the [ theming guide] [ theming ] :
1095+
1096+ ``` scss
1097+ @use ' @angular/material' as mat ;
1098+
1099+ html {
1100+ @include mat .theme ((
1101+ color : mat .$violet-palette ,
1102+ typography: Roboto,
1103+ density: 0 ,
1104+ ));
1105+ }
1106+ ```
1107+
1108+ Alternatively, you can create a theme object with ` mat.define-theme ` and pass it
1109+ to individual component theme mixins. This approach is needed for backwards
1110+ compatibility helpers such as ` color-variants-backwards-compatibility ` .
10961111
10971112### Update usages of APIs that are not supported for Material 3 themes
10981113
You can’t perform that action at this time.
0 commit comments