visualjerk / vue-cion-design-system

CION - Design system boilerplate for Vue.js
https://cion.visualjerk.de
MIT License
142 stars 24 forks source link

Switch to Dark Mode? #8

Closed appinteractive closed 5 years ago

appinteractive commented 5 years ago

@visualjerk Is there a way that the components could easily switch to dark mode without the need to dublicate the whole styleguide?

visualjerk commented 5 years ago

The only "simple" option that pops to my mind right now would be to do this depending on an environment variable.

Depending on its value we could then either prepend tokens.scss or tokens-dark.scss to shared.scss via webpacks sass-loader.

appinteractive commented 5 years ago

But that would not happen on production I think!?

visualjerk commented 5 years ago

Just for reference: https://github.com/webpack-contrib/style-loader#useable https://www.npmjs.com/package/vue-theme-loader

visualjerk commented 5 years ago

In current master you find the option to add themes by simply creating a subfolder in the tokens folder. While this is not documented yet, it is pretty self explaining. Happy theming 😄