This is about the Bulma CSS framework
I'm using Bulma version [0.9.4]
This is a Sass issue: I'm using version [1.64.2]
I am sure this issue is not a duplicate?
Description
Steps to Reproduce
I want to use css variables with Bulma to create a dark/light mode toggle on via the data-theme attribute. Bulma is referenced as npm package and compiled with sass and vite.
I followed Bulma docs to set custom variables, the following code reduced to minimum:
// 1. Import the initial variables
@import "../../node_modules/bulma/sass/utilities/initial-variables.sass";
@import "../../node_modules/bulma/sass/utilities/functions.sass";
// 2. Set your own initial variables
html[data-theme="dark"] {
--fs-background: #252529;
}
html[data-theme="light"] {
--fs-background: #f6f6f7;
}
// 3. Set the derived variables
$background: var(--fs-background);
@import "../../node_modules/bulma/bulma.sass";
I also used the steps above to set other variables which worked fine: (other css variables omitted for shorter code)
This is about Bulma.
Overview of the problem
This is about the Bulma CSS framework I'm using Bulma version [0.9.4] This is a Sass issue: I'm using version [1.64.2] I am sure this issue is not a duplicate?
Description
Steps to Reproduce
I want to use css variables with Bulma to create a dark/light mode toggle on via the
data-theme
attribute. Bulma is referenced as npm package and compiled with sass and vite.I followed Bulma docs to set custom variables, the following code reduced to minimum:
I also used the steps above to set other variables which worked fine: (other css variables omitted for shorter code)
Expected behavior
I expect
$background
to be replaced just like the othersActual behavior
I get a compilation error: