I set the Role appropriately for a form that I want it to appear on, and the arrow appears, but it is not animated.
Is there a special way to annotate the Keyframes for an animation in CSS so that they work with Roles and appear properly on the form?
What is otherwise the best way to embed animated CSS onto a form?
+1 for the Animation module in Anvil Extras. I had prototyped some CSS animations on CodePen that I then needed to move over to my Anvil app. The initial process was a bit annoying to figure out
Basically, you’ll want to remove the animation attributes and keyframes from the CSS entirely. Build that same KeyFrame series through a Transition object, then an Effect, and then/or do an .animate(), making sure you target the correct DOM element, using anvil.js.document.querySelector('.className')
Previously the keyframes and the css property both had the same name (anvil-role-LeftArrow) but now it seems you have renamed the keyframes to simply “arrow”? How would the app know which property these keyframes are for?