callstack / callstack/linaria

Support `keyframes` and `createGlobalStyle` in "@linaria/react"

Open
#1,427 3 comments 5 reactions 0 assignees View on GitHub
feature: proposal 💬 needs: triage 🏷
Dominant language
TypeScript
Stars
12.4k
Forks
413
PR merge metrics
No merged PRs in 30d

Description

## Describe the feature

These two functions come from Styled Components.

`keyframes` function will create a CSS keyframes with a unique name, to make sure that there are no naming conflicts.

You can even inline the declaration without having to think of a keyframes name:
```css
div {
animation: ${keyframes`
from {
opacity: 0;
}
`} ease-out 1s;
}
```

`createGlobalStyle` will create a global style for every components to use, without to write it in a single CSS file.

## Motivation

This will make it easier to switch Styled Components to Linaria.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.