Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/material/schematics/ng-add/theming/create-custom-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

/** Create custom theme for the given application configuration. */
export function createCustomTheme(userPaletteChoice: string) {
export function createCustomTheme(userPaletteChoice: string): string {
const colorPalettes = new Map<string, {primary: string; tertiary: string}>([
['azure-blue', {primary: 'azure', tertiary: 'blue'}],
['rose-red', {primary: 'rose', tertiary: 'red'}],
Expand All @@ -31,7 +31,9 @@ html {
typography: Roboto,
density: 0,
));
}

body {
// Default the application to a light color theme. This can be changed to
// \`dark\` to enable the dark color theme, or to \`light dark\` to defer to the
// user's system settings.
Expand All @@ -43,5 +45,9 @@ html {
background-color: var(--mat-sys-surface);
color: var(--mat-sys-on-surface);
font: var(--mat-sys-body-medium);
}`;

// Reset the user agent margin.
margin: 0;
}
`;
}
Loading