docs: add CSS custom properties section to style directive (#18065)

Adds documentation for using CSS custom properties with the `style:`
directive. I think this was lost at some point during the great
transition. It's only mentioned in the [best
practices](https://svelte.dev/docs/svelte/best-practices#Using-JavaScript-variables-in-CSS)
section, so I thought it would make sense to include it.
pull/18073/head
Matia 3 months ago committed by GitHub
parent f8ef6de325
commit 7a2a17557c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -42,3 +42,9 @@ even over `!important` properties:
<div style:color="red" style="color: blue">This will be red</div>
<div style:color="red" style="color: blue !important">This will still be red</div>
```
You can set CSS custom properties:
```svelte
<div style:--columns={columns}>...</div>
```

Loading…
Cancel
Save