icontacts premium asked 1 year ago


Hello MDB Team,

I have a couple of questions about the themes (or skins) switching approach.In previous MDB4 Angular Pro I've used your custom skin approach your custom skin approach.

The new MDB5 Angular Pro approach has been changed to the custom/dark/light theme customization.

  1. What's the way of switching from dark to light "on the fly" as an example by clicking a trigger element on the page?
  2. Is there a way for deep configuration of the themes? I've read this section of the creating a new theme and as far as I get - we can customize only primary and secondary color for the new theme.


@icontacts You can create multiple themes and add every @include instruction inside a class:

.custom-theme-class {
    @include mdb-theme($my-light-theme);
}

Thanks to this, the theme will be displayed only when you add this class to the body element and you can change the class added to this element to switch themes.

We plan to update our documentation to address this use case.

The primary and secondary colors are the only ones that you need to change to create a new theme. We want to maintain control over other elements and choose their colors so that they are consistent with our design, regardless of the input colors provided.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • User: Premium
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 1.0.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10 Pro
  • Provided sample code: No
  • Provided link: Yes