Open
Description
https://svelte.dev/tutorial/svelte/component-styles says:
Any parent element (such as
<div class="boxes">
) can set the value of--color
, but we can also set it on individual components:<div class="boxes"> <Box --color="red" /> <Box --color="green" /> <Box --color="blue" /> </div>
This makes me think that I can do:
<div --color="red">
but this results in the error:
Error compiling App.svelte
'--color' is not a valid attribute name https://svelte.dev/e/attribute_invalid_name
I think this could be explained clearer. Maybe show the way to set the value on a HTML tag first, and then introduce the component syntax?
Metadata
Metadata
Assignees
Labels
No labels