Skip to content

Commit

Permalink
fix(material/core): update prebuilt themes to use mat.theme (#29989)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Seguin <andrewseguin@google.com>
  • Loading branch information
andrewseguin and Andrew Seguin authored Nov 11, 2024
1 parent 0a5b036 commit 1568ac2
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 92 deletions.
33 changes: 10 additions & 23 deletions src/material/core/theming/prebuilt/azure-blue.scss
Original file line number Diff line number Diff line change
@@ -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);
33 changes: 10 additions & 23 deletions src/material/core/theming/prebuilt/cyan-orange.scss
Original file line number Diff line number Diff line change
@@ -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);
33 changes: 10 additions & 23 deletions src/material/core/theming/prebuilt/magenta-violet.scss
Original file line number Diff line number Diff line change
@@ -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);
33 changes: 10 additions & 23 deletions src/material/core/theming/prebuilt/rose-red.scss
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 1568ac2

Please sign in to comment.