Firefox ignores the second definition. This leads to the following problem:
When fixed_navbar is set to true, bulma.io's automatic dark mode works correctly, because class is defined twice and class="theme-light" is ignored by Firefox.
When fixed_navbar is set to false, bulma.io's automatic dark mode does not work, because class="theme-light" overrides it.
Proposed solution:
Only define class once
Make it possible to enforce a dark or light theme by introducing site.force_theme
class="{% if site.fixed_navbar %} has-navbar-fixed-{{ site.fixed_navbar }} {% endif %} {% if site.force_theme %} theme-{{ site.force_theme }} {% endif %}"
The following code in
/_layouts/default.html
defines theclass
attribute twice:Firefox ignores the second definition. This leads to the following problem:
fixed_navbar
is set to true, bulma.io's automatic dark mode works correctly, becauseclass
is defined twice andclass="theme-light"
is ignored by Firefox.fixed_navbar
is set to false, bulma.io's automatic dark mode does not work, becauseclass="theme-light"
overrides it.Proposed solution:
class
oncesite.force_theme