Comments (4)
Sure, this weekend I hope to have it ready.
from elm-simple-animation.
Hi Rolando, that's awesome! I wonder if we could add a built in helper to the Animated
module that wraps what you've done above:
import Html.Styled as Htmls
import Html.Styled.Attributes as Attr
import Simple.Animation exposing (Animation)
import Simple.Animation.Animated as Animated
animatedStyleNode :
(List (Htmls.Attribute msg) -> List (Htmls.Html msg) -> Htmls.Html msg)
-> Animation
-> List (Htmls.Attribute msg)
-> List (Htmls.Html msg)
-> Htmls.Html msg
animatedStyleNode =
Animated.elmCss
{ text = Htmls.text
, node = Htmls.node
, class = Attr.class
}
from elm-simple-animation.
Yes!, I think I would be a great addition to the package.
Just some thoughts:
Maybe it's a good idea to think again if the class is needed at all.
I understand that with other implementations, the css it's linked to the class of this node.
But in elm-css
all the style added is directly through an inline style element.
Therefore, maybe it is not needed. All additional styling is already provided with other tailwind classes.
or ¿am i missing something? Hope I explained myself (not native English speaker)
from elm-simple-animation.
Great!
I'm not super familiar with the internals of elm-css so it's definitely worth a try - the stylesheet Animated.custom
returns expects there to be a dom node with a specific class name so a keyframes animation can be applied:
@keyframes anim-1000infinite-y-0-y-5 {
0% { transform: translateY(0px) }
100% { transform: translateY(5px) }
}
.anim-1000infinite-y-0-y-5 {
animation-name: anim-1000infinite-y-0-y-5;
animation-iteration-count: infinite;
animation-duration: 1000ms;
}
Happy for you to make a PR if you have time?
from elm-simple-animation.
Related Issues (13)
- Clearer docs for Animated Elm-UI HOT 3
- Creating an Empty animation HOT 4
- leveraging animationend and transitionend
- More in depth mouse hover example HOT 4
- Please add this to the wiki HOT 1
- Animated Collections
- Add Elm CSS adaptor
- Yoyo animation
- Simple.Transition module HOT 1
- Common format for Animated helpers
- Include imports in examples HOT 2
- Common module extended eases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-simple-animation.