DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 967,611 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
jgsanchezg
jgsanchezg

Posted on

Multi Theme with native css variables and javascript

https://stackblitz.com/edit/js-1fwpat

With this example you can set a multi theme site by using native css variables and JavaScript functions.

Basically you set variables and its default values at style.css file
Then we load themes.json as a configuration file where we can specify as much themes as we need, then we set those values with functions.js. You don't need to reload page to see changes applied.

It's my first collaboration in this platform, I appreciate any help to make it clearer.

Top comments (0)

Classic DEV Post from 2020:

js visualized

πŸš€βš™οΈ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! πŸ₯³

Happy coding!