Adds documentation for global @keyframes

pull/4232/head
Kevin Åberg Kultalahti 6 years ago committed by GitHub
parent b9368d5de4
commit 24cec6f4f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -253,3 +253,13 @@ To apply styles to a selector globally, use the `:global(...)` modifier.
}
</style>
```
If you want to make @keyframes that are accesible globally you need to prepend your keyframe names with `-global-`.
```html
<style>
@keyframes -global-my-animation-name {...}
</style>
```
The `-global-` part will be remove when compiled and the keyframe then be referenced using just `my-animation-name` elsewhere in your code.

Loading…
Cancel
Save