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

Current support for keyframes #275

Closed
kuon opened this Issue Jun 8, 2017 · 5 comments

Comments

Projects
None yet
5 participants
@kuon

kuon commented Jun 8, 2017

As I understand, elm-css do not provide native support for keyframes.

But is it possible to generate keyframes css with something like property?

@rtfeldman

This comment has been minimized.

Show comment
Hide comment
@rtfeldman

rtfeldman Sep 4, 2017

Owner

@kuon Yep! http://package.elm-lang.org/packages/rtfeldman/elm-css/11.0.0/Css#selector should do the trick.

(Sorry I took so long responding to this. 😅)

Owner

rtfeldman commented Sep 4, 2017

@kuon Yep! http://package.elm-lang.org/packages/rtfeldman/elm-css/11.0.0/Css#selector should do the trick.

(Sorry I took so long responding to this. 😅)

@rtfeldman rtfeldman closed this Sep 4, 2017

@jeffutter

This comment has been minimized.

Show comment
Hide comment
@jeffutter

jeffutter Sep 7, 2017

I'm wondering if there are any examples to do this. So far I have:

        , selector "@keyframes sk-bouncedelay"
            [ descendants
                [ selector "0%, 80%, 100%"
                    [ property "transform" "scale(0)" ]
                , selector "40%"
                    [ property "transform" "scale(1.0)" ]
                ]
            ]

However, that yields:

@keyframes sk-bouncedelay  0%, 80%, 100% {
    transform: scale(0);
}

@keyframes sk-bouncedelay  40% {
    transform: scale(1.0);
}

I am hoping to get:

  @keyframes sk-bouncedelay {
    0%, 80%, 100% { 
      transform: scale(0);
    } 40% { 
      transform: scale(1.0);
    }
  }

Any suggestions?

jeffutter commented Sep 7, 2017

I'm wondering if there are any examples to do this. So far I have:

        , selector "@keyframes sk-bouncedelay"
            [ descendants
                [ selector "0%, 80%, 100%"
                    [ property "transform" "scale(0)" ]
                , selector "40%"
                    [ property "transform" "scale(1.0)" ]
                ]
            ]

However, that yields:

@keyframes sk-bouncedelay  0%, 80%, 100% {
    transform: scale(0);
}

@keyframes sk-bouncedelay  40% {
    transform: scale(1.0);
}

I am hoping to get:

  @keyframes sk-bouncedelay {
    0%, 80%, 100% { 
      transform: scale(0);
    } 40% { 
      transform: scale(1.0);
    }
  }

Any suggestions?

@Wrent

This comment has been minimized.

Show comment
Hide comment
@Wrent

Wrent Feb 15, 2018

@jeffutter have you managed to solve this?

Wrent commented Feb 15, 2018

@jeffutter have you managed to solve this?

@jeffutter

This comment has been minimized.

Show comment
Hide comment
@jeffutter

jeffutter Feb 15, 2018

@Wrent nope sorry. I haven't done much with elm lately.

jeffutter commented Feb 15, 2018

@Wrent nope sorry. I haven't done much with elm lately.

@ryan-senn

This comment has been minimized.

Show comment
Hide comment
@ryan-senn

ryan-senn Jul 6, 2018

I managed to hack spinning animations like this if someone else is desperate enough in the meantime:

selector "@keyframes spin"
    [ property "0% { transform" "rotate(0deg); } 100% { transform: rotate(360deg); }" ]

Essentially with property, using the string up to the first : (colon) as the key and the rest as the value.

Comes out like this:

@keyframes spin {
    0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); };
}

ryan-senn commented Jul 6, 2018

I managed to hack spinning animations like this if someone else is desperate enough in the meantime:

selector "@keyframes spin"
    [ property "0% { transform" "rotate(0deg); } 100% { transform: rotate(360deg); }" ]

Essentially with property, using the string up to the first : (colon) as the key and the rest as the value.

Comes out like this:

@keyframes spin {
    0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment