We'll set up a --color
custom property, with a red
fallback value.
Svelte supports CSS custom properties as component "props".
Svelte components have first-class support for CSS custom properties (also known as CSS variables).
In this example, we'll allow the color of our HelloWorld
component to be overridden with a CSS variable.
We'll set up a --color
custom property, with a red
fallback value.
Svelte supports CSS custom properties as component "props".
Further reading on this topic.