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 {...} (for css animations) #227

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Warry
Copy link
Contributor

@Warry Warry commented Feb 17, 2017

Ongoing work, I'm not entirely sure I'm doing this right. See comments.

else
let
props =
Preprocess.toPropertyPairs mixins
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of brutal: converting a Mixin to properties without warnings.

\() ->
stylesheet
[ keyframes "foo"
[ ( 0, [ backgroundColor red ] )
Copy link
Contributor Author

@Warry Warry Feb 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alternative suggestion :

keyframes "foo"
    [ from [ backgroundColor red ]
    , progress 33.3 [ backgroundColor blue ]
    , to [ backgroundColor yellow ]
    ]

@Warry
Copy link
Contributor Author

Warry commented Feb 17, 2017

It's kind of working but now I'd like to understand what you mean about warnings and how you imagine I should deal with them.

The hart of the problem is here I think : https://github.com/nomalab/elm-css/blob/master/src/Css/Preprocess/Resolve.elm#L156-L181 where we "resolve" the keyframes.

I imagine that I should do a better job at converting Preprocess.Mixin to Structure.Property and detect misusages like nesting snippets etc... Do you agree ?

@Warry Warry changed the title Proof of concept: @keyframes {...} support @keyframes {...} (for css animations) Feb 22, 2017
@Warry
Copy link
Contributor Author

Warry commented Mar 7, 2017

Can someone please give me some feedbacks on this, so that I can complete the work?

@kuon
Copy link

kuon commented Jun 8, 2017

Any update on this? Full animation support in elm css would be very good. I can help too.

@shuhei
Copy link

shuhei commented Sep 15, 2017

It seems like a related issue was created #313

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants