Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support keyframes and createGlobalStyle in "@linaria/react" #1427

Open
otomad opened this issue Oct 24, 2024 · 1 comment
Open

Support keyframes and createGlobalStyle in "@linaria/react" #1427

otomad opened this issue Oct 24, 2024 · 1 comment
Labels
feature: proposal 💬 New feature proposal that needs to be discussed needs: triage 🏷 Issue needs to be checked and prioritized

Comments

@otomad
Copy link

otomad commented Oct 24, 2024

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:

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.

@otomad otomad added the feature: proposal 💬 New feature proposal that needs to be discussed label Oct 24, 2024
@github-actions github-actions bot added the needs: triage 🏷 Issue needs to be checked and prioritized label Oct 24, 2024
@KutnerUri
Copy link

I agree, right now keyframes are preprocessed and it feels like dark magic.
it would be nice to have a dedicated function for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: proposal 💬 New feature proposal that needs to be discussed needs: triage 🏷 Issue needs to be checked and prioritized
Projects
None yet
Development

No branches or pull requests

2 participants