lemonsaurus / django-simple-bulma

Django application to add the Bulma CSS framework and its extensions
MIT License
137 stars 17 forks source link

Alternative variables dict in BULMA_SETTINGS #46

Closed lemonsaurus closed 3 years ago

lemonsaurus commented 4 years ago

In some cases, a website will want to have two themes, e.g. a dark theme and a light theme. To do this while using this plugin is tricky because all the scss variables are compiled at startup. But here's what we can do:

Now the client can simply add this second dict of variables and define the dark theme that way, and then add some client logic to allow switching between them by switching which template tag is called in the templates.

JonasUJ commented 4 years ago

Why stop at one alternative? I'm thinking we let people add any number of "{name}_variables" in addition to the standard "variables". The {% bulma %} tag could then be modified to accept an optional name argument, like this {% bulma 'alt' %}.

lemonsaurus commented 4 years ago

Interesting. I support this idea.

lemonsaurus commented 4 years ago

This is not in scope for v2.0.0, let's solve it for a future version.