Skip to content

Commit

Permalink
site: add documentation for global keyframes (#4232)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmodrome authored and Conduitry committed Jan 8, 2020
1 parent b9368d5 commit 3d9655a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions site/content/docs/01-component-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,15 @@ To apply styles to a selector globally, use the `:global(...)` modifier.
}
</style>
```

---

If you want to make @keyframes that are accessible globally, you need to prepend your keyframe names with `-global-`.

The `-global-` part will be removed when compiled, and the keyframe then be referenced using just `my-animation-name` elsewhere in your code.

```html
<style>
@keyframes -global-my-animation-name {...}
</style>
```

0 comments on commit 3d9655a

Please sign in to comment.