Kevin Powell - CommunityKP-C
Kevin Powell - Community2y ago
128 replies
Venyl

Can't override Open-Props custom property

I've been using Open-Props in my Svelte projects recently. I've tried overriding --shadow-color and noticed that I'm not able to. Here is my code:
.meter-bar {
    --shadow-color: 50 100% 50%;
    box-shadow: var(--shadow-5);
}

I've looked at Open-Props' stackblitz playgrounds and noticed I can't override the color there either.
Dev tools show it should be getting used.
It's not Svelte's fault because I tried doing this in a raw codepen with no success.
This issue persists across browsers (Firefox Dev, Chrome Canary, Arc)
What am I doing wrong?
Was this page helpful?