Closed lemonsaurus closed 3 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' %}
.
Interesting. I support this idea.
This is not in scope for v2.0.0, let's solve it for a future version.
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:
alt_variables
dict is present inBULMA_SETTINGS
, we compile two css files,bulma.css
andbulma_alt.css
{% bulma_alt %}
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.