In a solution we're using sass variables to define css variables, which in turn is places into the code using postcss.
The problem we ran into was that this example:
$primary: #f00;
:root {
--section-hero-intro-title-color: $primary;
--section-hero-intro-background: transparent;
--section-hero-intro-before-background: transparent;
}
.example {
color: var(--section-hero-intro-title-color);
}
was compiled into this:
.example {
color: $primary;
}
where the expected result is:
.example {
color: #f00;
}
what ended up fixing the issue was npm installing [email protected].
I posted the issue on the node-sass github page as well, and they provided a fix:
:root {
--foo: #{$bar};
}
see it here:
Most helpful comment
I posted the issue on the node-sass github page as well, and they provided a fix:
:root { --foo: #{$bar}; }see it here: