From d55ec612cc66b42971c9da2677bc6e54017dd271 Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Mon, 11 Nov 2024 11:47:14 -0700 Subject: [PATCH] fix(material/core): update prebuilt themes to use mat.theme (#29989) Co-authored-by: Andrew Seguin (cherry picked from commit 1568ac287911c3d8f02e9c54d80d8cda4bd40873) --- .../core/theming/prebuilt/azure-blue.scss | 33 ++++++------------- .../core/theming/prebuilt/cyan-orange.scss | 33 ++++++------------- .../core/theming/prebuilt/magenta-violet.scss | 33 ++++++------------- .../core/theming/prebuilt/rose-red.scss | 33 ++++++------------- 4 files changed, 40 insertions(+), 92 deletions(-) diff --git a/src/material/core/theming/prebuilt/azure-blue.scss b/src/material/core/theming/prebuilt/azure-blue.scss index d9d6ee55eec3..78c29f247c34 100644 --- a/src/material/core/theming/prebuilt/azure-blue.scss +++ b/src/material/core/theming/prebuilt/azure-blue.scss @@ -1,27 +1,14 @@ -@use '../../theming/definition'; -@use '../../theming/color-api-backwards-compatibility'; @use '../../theming/palettes'; -@use '../all-theme'; -@use '../../core'; -@use '../../typography/typography'; - -@include core.app-background(); -@include core.elevation-classes(); - -$theme: definition.define-theme(( - color: ( - theme-type: light, - primary: palettes.$azure-palette, - tertiary: palettes.$blue-palette, - ), - density: ( - scale: 0, - ) -)); +@use '../../../core/tokens/m3-system'; html { - @include all-theme.all-component-themes($theme); + @include m3-system.theme(( + color: ( + theme-type: light, + primary: palettes.$azure-palette, + tertiary: palettes.$blue-palette, + ), + typography: Roboto, + density: 0, + )); } - -@include color-api-backwards-compatibility.color-variants-backwards-compatibility($theme); -@include typography.typography-hierarchy($theme); diff --git a/src/material/core/theming/prebuilt/cyan-orange.scss b/src/material/core/theming/prebuilt/cyan-orange.scss index 40eec288ef57..8146612e175f 100644 --- a/src/material/core/theming/prebuilt/cyan-orange.scss +++ b/src/material/core/theming/prebuilt/cyan-orange.scss @@ -1,27 +1,14 @@ -@use '../../theming/definition'; -@use '../../theming/color-api-backwards-compatibility'; @use '../../theming/palettes'; -@use '../all-theme'; -@use '../../core'; -@use '../../typography/typography'; - -@include core.app-background(); -@include core.elevation-classes(); - -$theme: definition.define-theme(( - color: ( - theme-type: dark, - primary: palettes.$cyan-palette, - tertiary: palettes.$orange-palette, - ), - density: ( - scale: 0, - ) -)); +@use '../../../core/tokens/m3-system'; html { - @include all-theme.all-component-themes($theme); + @include m3-system.theme(( + color: ( + theme-type: dark, + primary: palettes.$cyan-palette, + tertiary: palettes.$orange-palette, + ), + typography: Roboto, + density: 0, + )); } - -@include color-api-backwards-compatibility.color-variants-backwards-compatibility($theme); -@include typography.typography-hierarchy($theme); diff --git a/src/material/core/theming/prebuilt/magenta-violet.scss b/src/material/core/theming/prebuilt/magenta-violet.scss index fe9084c0e17b..ab3cde2da5e4 100644 --- a/src/material/core/theming/prebuilt/magenta-violet.scss +++ b/src/material/core/theming/prebuilt/magenta-violet.scss @@ -1,27 +1,14 @@ -@use '../../theming/definition'; -@use '../../theming/color-api-backwards-compatibility'; @use '../../theming/palettes'; -@use '../all-theme'; -@use '../../core'; -@use '../../typography/typography'; - -@include core.app-background(); -@include core.elevation-classes(); - -$theme: definition.define-theme(( - color: ( - theme-type: dark, - primary: palettes.$magenta-palette, - tertiary: palettes.$violet-palette, - ), - density: ( - scale: 0, - ) -)); +@use '../../../core/tokens/m3-system'; html { - @include all-theme.all-component-themes($theme); + @include m3-system.theme(( + color: ( + theme-type: dark, + primary: palettes.$magenta-palette, + tertiary: palettes.$violet-palette, + ), + typography: Roboto, + density: 0, + )); } - -@include color-api-backwards-compatibility.color-variants-backwards-compatibility($theme); -@include typography.typography-hierarchy($theme); diff --git a/src/material/core/theming/prebuilt/rose-red.scss b/src/material/core/theming/prebuilt/rose-red.scss index 8e82d0e14f1c..c3114e9586b1 100644 --- a/src/material/core/theming/prebuilt/rose-red.scss +++ b/src/material/core/theming/prebuilt/rose-red.scss @@ -1,27 +1,14 @@ -@use '../../theming/definition'; -@use '../../theming/color-api-backwards-compatibility'; @use '../../theming/palettes'; -@use '../all-theme'; -@use '../../core'; -@use '../../typography/typography'; - -@include core.app-background(); -@include core.elevation-classes(); - -$theme: definition.define-theme(( - color: ( - theme-type: light, - primary: palettes.$rose-palette, - tertiary: palettes.$red-palette, - ), - density: ( - scale: 0, - ) -)); +@use '../../../core/tokens/m3-system'; html { - @include all-theme.all-component-themes($theme); + @include m3-system.theme(( + color: ( + theme-type: light, + primary: palettes.$rose-palette, + tertiary: palettes.$red-palette, + ), + typography: Roboto, + density: 0, + )); } - -@include color-api-backwards-compatibility.color-variants-backwards-compatibility($theme); -@include typography.typography-hierarchy($theme);