-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
I've defined a dynamically updating CSS variable --hue in App.svelte (updates every 50ms) and I'm passing it to Child components using four different methods:
Directly via Svelte's --bg-color property on the component tag
Via the style attribute setting --bg-color
Relying on CSS variable inheritance (parent defines variable, child uses it)
Referencing the parent variable in the style attribute with var(--parent-bg)
However, I've noticed that the colors displayed in the child components are inconsistent
Reproduction
https://svelte.dev/playground/5b8bf537ceb040ea9ece40788153d0a8?version=5.38.0
Logs
System Info
svelte playground + chromeSeverity
annoyance
Metadata
Metadata
Assignees
Labels
No labels