Skip to content

can I use my own css var ? #39463

Discussion options

You must be logged in to vote

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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Benoit-ROBIN
Comment options

Answer selected by Benoit-ROBIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants