From 5df2032abecc1b40a22add37f1e99822c66c108c Mon Sep 17 00:00:00 2001 From: Marcelo Junior Date: Sun, 25 Aug 2019 01:04:56 +0200 Subject: [PATCH] Adding explanation on docs why avoid same name in multi class attrs --- site/content/docs/02-template-syntax.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 1aa3bed6e4..a8007ec48e 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -694,6 +694,9 @@ However, the shorthand syntax cannot be used on this case.
...
``` +> 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* ```sv