Find answers, ask questions, and connect with our
community around the world.

Forums Forums Web Design How would you implement theme swithing?

  • How would you implement theme swithing?

    updated 2 years, 11 months ago 0 Member · 1 Post
  • Maverick

    Member
    July 22, 2019 at 3:45 am

    I work on a project where we are building a framework consisting of Angular components. This framework will be used in various projects both inside and outside our organization. We also have developed a design system. This is basically a style guide on the (internal) web with HTML source code for components. The output of the design system today is a CSS file. ​ Now the time has come to implement theme switching (dusk / dawn). Doing some research I see there are several ways of doing this. I’ve looked at how this can be done with CSS Custom properties, how to do it using Angular Material and various methods found in this blog. But I’m still unsure what method would be best for our framework / Design System. We will not have component level theming, because you will never switch theme of a single component. It will also be a lot of work updating all components if you put theme styling in each component and then you add a new theme. I’m also against having dusk and day styling in the same css file – we want to reduce file size, not increase it. ​ Does anyone have expereince with any of the above approaches? How do you work with SASS and whats the CSS output? How do you do the switching of themes? – by hq overview spstieng – –

Viewing 1 of 1 replies
Reply to: Maverick
Your information:

Cancel
Original Post
0 of 0 posts June 2018
Now