Skip to content

Alternative variables dict in BULMA_SETTINGS #46

Closed
@lemonsaurus

Description

@lemonsaurus

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:

  • If an alt_variables dict is present in BULMA_SETTINGS, we compile two css files, bulma.css and bulma_alt.css
  • We create a template tag for adding this other css file as well, something like {% 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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions