Skip to content
Closed
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
4 changes: 1 addition & 3 deletions documentation/docs/03-template-syntax/18-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Svelte also exposes the `ClassValue` type, which is the type of value that the `

## The `class:` directive

Prior to Svelte 5.16, the `class:` directive was the most convenient way to set classes on elements conditionally.
For simple cases, the `class:` directive offers a convenient way to set classes on elements conditionally.

```svelte
<!-- These are equivalent -->
Expand All @@ -98,5 +98,3 @@ As with other directives, we can use a shorthand when the name of the class coin
```svelte
<div class:cool class:lame={!cool}>...</div>
```

> [!NOTE] Unless you're using an older version of Svelte, consider avoiding `class:`, since the attribute is more powerful and composable.
Loading