Skip to content

I cannot get the dark themes to work #3298

@Itagiba

Description

@Itagiba

I cannot find an open/closed issue with this but I found this: http://stackoverflow.com/questions/41967601/dark-theme-in-angular-material2-is-not-dark

For the contrast from white to dark to apply if you add a $theme: mat-dark-theme($primary, $accent); in struction

Everything just stays on the light theme no matter which theme you choose or create.

If you @import '~@angular/material/core/theming/prebuilt/purple-green'; to app.component.scss (using the default CLI project)

or create your own:

@include mat-core();

$primary: mat-palette($mat-indigo,A400);
$accent: mat-palette($mat-lime,A400);
$warn: mat-palette($mat-red);

$test: mat-dark-theme($primary, $accent, $warn);

@include angular-material-theme($test);

The colours are available but none of the stylings under $mat-dark-theme-background and $mat-dark-theme-foreground work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cannot reproduceThe team is unable to reproduce this issue with the information provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions