Skip to content

Commit e567c6c

Browse files
authored
day 24 (sveltejs#1068)
1 parent 037f046 commit e567c6c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

apps/svelte.dev/content/blog/2024-12-01-advent-of-svelte.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ We've added a 'download app' option to the toolbox in the playground — selecti
190190

191191
- [playground](/playground)
192192

193-
## Day 24
193+
## Day 24: clsx built in
194194

195-
Coming soon!
195+
Svelte now uses [clsx](https://github.com/lukeed/clsx) to parse `class` attributes, meaning you can use objects and arrays to conditionally add and remove classes. It's much more powerful and flexible than the `class:` directive, and — since this is Svelte — you still get dead code elimination of unused CSS. This feature is particularly useful for all you Tailwind-heads.
196+
197+
- [docs](/docs/svelte/class)
198+
- [tutorial](/tutorial/svelte/classes)
199+
- [demo](/playground/61450f09983046efb18273d5c94db7b4?version=5.16.0)
200+
201+
---
202+
203+
And that's a wrap! Thanks for following along, everyone, and Merry Christmas to all who celebrate.

0 commit comments

Comments
 (0)