Skip to content

Commit 25a4d34

Browse files
author
Rich Harris
committed
tweak
1 parent 201cf15 commit 25a4d34

File tree

1 file changed

+3
-5
lines changed
  • content/tutorial/03-advanced-svelte/06-classes/02-class-shorthand

1 file changed

+3
-5
lines changed

content/tutorial/03-advanced-svelte/06-classes/02-class-shorthand/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ title: Shorthand class directive
55
Often, the name of the class will be the same as the name of the value it depends on:
66

77
```svelte
8-
/// file: App.svelte
8+
/// no-file
99
<div class:big={big}>
10-
<!-- ... -->
11-
</div>
1210
```
1311

1412
In those cases we can use a shorthand form:
1513

1614
```svelte
1715
/// file: App.svelte
18-
<div class:big>
19-
<!-- ... -->
16+
<div +++class:big+++>
17+
some {big ? 'big' : 'small'} text
2018
</div>
2119
```

0 commit comments

Comments
 (0)