docs: raise importance of global vs local transitions (#15479)

* Doc: Raise importance of global vs local transitions

* switch order

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/15714/head
Min Idzelis 5 months ago committed by GitHub
parent e9a16c4b42
commit 0ca1f4a37e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,10 +22,6 @@ The `transition:` directive indicates a _bidirectional_ transition, which means
{/if}
```
## Built-in transitions
A selection of built-in transitions can be imported from the [`svelte/transition`](svelte-transition) module.
## Local vs global
Transitions are local by default. Local transitions only play when the block they belong to is created or destroyed, _not_ when parent blocks are created or destroyed.
@ -40,6 +36,10 @@ Transitions are local by default. Local transitions only play when the block the
{/if}
```
## Built-in transitions
A selection of built-in transitions can be imported from the [`svelte/transition`](svelte-transition) module.
## Transition parameters
Transitions can have parameters.

Loading…
Cancel
Save