can I use my own css var ? #39463
-
Hi I have a file custom.scss
with this code I have an error
My custom css var are loaded in App.js (react app) from a custom lib. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Benoit-ROBIN, |
Beta Was this translation helpful? Give feedback.
Hi @Benoit-ROBIN,
For now, it's not really possible to override the value of some colors by setting them to CSS variables because we are still using Sass functions in the core Bootstrap code to calculate some other colors or to find some contrast ratio. This is why you have
SassError: $color: var(--my-custom-white) is not a color.
.For some colors, it might work, but it depends on what you will override and how.
This is definitely something we'd like to improve in the v6.