I am injecting CSS variables into .scss
and in some cases I want that I reduce the opacity. The colours can be HEX or RGBA (depending of user selection).
I have tried some of the scss methods but it does not work.
.bg-primary {
background-color: rgba(var(--primary), 0.5) !important;
}
This results in only white.
Also:
.bg-primary {
background-color: transparentize(var(--primary), 0.5) !important;
}
But it gives me error:
SassError: var(--primaryBootstrapColor) is not a color.
node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js!./src/common/styles/
Packages:
"sass": "^1.49.9",
"sass-loader": "^12.6.0",
"node-sass": "^6.0.1",