cssVarStore
A writable store to manipulate CSS variables.
Demo
Color Value for --bg
background: var(--bg)
Usage
<script>
import { cssVarStore } from 'svelte-legos'
const bg = cssVarStore('--bg', { initialValue: 'gray' })
const primary = cssVarStore('--primary', { initialValue: 'red' })
const secondary = cssVarStore('--secondary', { initialValue: 'black' })
</script>
<input bind:value={$bg} />
<input bind:value={$primary} />
<input bind:value={$secondary} />