-
-
Save hteumeuleu/89e93c95b08bf85e72a2fa59b936fd33 to your computer and use it in GitHub Desktop.
Script to get all the elements with a CSS `animation` property declared
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var all = document.querySelectorAll('*'); | |
var allAnimated = new Array(); | |
for(var i=0; i < all.length; i++) { | |
var an = window.getComputedStyle(all[i], '').animationName; | |
if(an !== "none") { | |
allAnimated.push(all[i]); | |
} | |
} | |
console.log(allAnimated); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Rémi.
I read your post on Medium (https://emails.hteumeuleu.com/how-gmail-came-to-stop-supporting-css-animations-4e6fd81f1b75) re Gmail not supporting the animation property in CSS. Since scripting isn't allowed in email HTML, what do you recommend for using the animation tag in email HTML? How can we successfully get animations to work in email HTML?
Thanks in advance!