Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Custom theme not applied #29

Open
xuko opened this issue Oct 22, 2018 · 2 comments
Open

Custom theme not applied #29

xuko opened this issue Oct 22, 2018 · 2 comments

Comments

@xuko
Copy link

xuko commented Oct 22, 2018

I'm trying to add my custom theme, but it isn't applied. it seems that the problem is that the official material theme has a mixin with the same name @mixin mat-datepicker-theme($theme)

@import '~@angular/material/theming';
@import '~@coachcare/datepicker/theming';

@mixin theme($theme) {
  @include angular-material-theme($theme);
  @include mat-datepicker-theme($theme);
}
@mhagnumdw
Copy link

I have the same problem!

My theme.scss

// ...
@import '~@coachcare/datepicker/theming';

@include mat-core();
// ...

@mixin custom-components-theme($palette) {
  @include menu-theme($palette);
  @include user-menu-theme($palette);
  @include notification-snackbar($palette);
  @include mat-datepicker-theme($palette);
}

.default-theme {
  @include theme-color-grabber($default-theme);
  @include angular-material-theme($default-theme);
  @include custom-components-theme($default-theme);
}

.dark-theme {
  @include theme-color-grabber($dark-theme);
  @include angular-material-theme($dark-theme);
  @include custom-components-theme($dark-theme);
}

@matheo
Copy link
Contributor

matheo commented Mar 4, 2021

Theming got more aligned to Angular Material v11 in the latest version
https://github.com/matheo/angular/tree/master/libs/datepicker#theming

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants