Skip to content

Commit 618d89c

Browse files
authored
docs: replace <div> with <svelte-css-wrapper> for style props (#13706)
1 parent ed6d7ee commit 618d89c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

documentation/docs/02-template-syntax/05-styles-and-classes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ Svelte's implementation is essentially syntactic sugar for adding a wrapper elem
194194
Desugars to this:
195195

196196
```svelte
197-
<div style="display: contents; --rail-color: black; --track-color: rgb(0, 0, 255)">
197+
<svelte-css-wrapper style="display: contents; --rail-color: black; --track-color: rgb(0, 0, 255)">
198198
<Slider bind:value min={0} max={100} />
199-
</div>
199+
</svelte-css-wrapper>
200200
```
201201

202202
For SVG namespace, the example above desugars into using `<g>` instead:
@@ -207,7 +207,7 @@ For SVG namespace, the example above desugars into using `<g>` instead:
207207
</g>
208208
```
209209

210-
> [!NOTE] Since this is an extra `<div>` (or `<g>`), beware that your CSS structure might accidentally target this. Be mindful of this added wrapper element when using this feature.
210+
> [!NOTE] Since this is an extra `<svelte-css-wrapper>` (or `<g>`), beware that your CSS structure might accidentally target this. Be mindful of this added wrapper element when using this feature.
211211
212212
Svelte's CSS Variables support allows for easily themeable components:
213213

0 commit comments

Comments
 (0)