Skip to content
Merged

day 24 #1068

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions apps/svelte.dev/content/blog/2024-12-01-advent-of-svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ We've added a 'download app' option to the toolbox in the playground — selecti

- [playground](/playground)

## Day 24
## Day 24: clsx built in

Coming soon!
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.

- [docs](/docs/svelte/class)
- [tutorial](/tutorial/svelte/classes)
- [demo](/playground/61450f09983046efb18273d5c94db7b4?version=5.16.0)

---

And that's a wrap! Thanks for following along, everyone, and Merry Christmas to all who celebrate.
Loading