Adding explanation on docs why avoid same name in multi class attrs

pull/3419/head
Marcelo Junior 6 years ago
parent 3c212252bb
commit 5df2032abe

@ -694,6 +694,9 @@ However, the shorthand syntax cannot be used on this case.
<div class:active,primary="{isActive}">...</div> <div class:active,primary="{isActive}">...</div>
``` ```
> You should take care when using multiple `class` attributes, because it can affect each other. Like when using `class="foo" class:foo`, the second expression can remove the first one. Svelte warns when it finds the same name in multiple `class` expressions.
#### use:*action* #### use:*action*
```sv ```sv

Loading…
Cancel
Save