Using Angular / Bootstrap, I changed CSS variables at runtime, using this line of code :
document.documentElement.style.setProperty(`--${property.name}`, property.value);
for reference, i used this example to deal with bootstrap SCSS imports : https://blog.wick.technology/runtime-dynamic-bootstrap-theme/
It does work, but some of Bootstrap' styles in bootstrap are broken :

I guess that's because the calc function does not support my dynamic vars :
.btn-primary {
color: hsla(0, 0%, calc(-100 * calc(var(--primary-l) - 58.59375%)), 1);
background-color: var(--primary);
border-color: var(--primary);
}
Is there any way that I can fix this behaviour ? Can I overload a new definition of btn-primary ?