0๐
โ
So an approach to fixing this as proposed by @vrugtehagel is to use fallbacks, I have done this for all my color related CSS values and it worked fine.
Example:
background-color: var(--${this.bgColor}, ${this.bgColor});
Bear in mind this will always prioritize the custom --
prefixed values if a normal value with the same name is valid.
Source:stackexchange.com