Skip to content

Instantly share code, notes, and snippets.

@hteumeuleu
Created February 23, 2018 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hteumeuleu/89e93c95b08bf85e72a2fa59b936fd33 to your computer and use it in GitHub Desktop.
Save hteumeuleu/89e93c95b08bf85e72a2fa59b936fd33 to your computer and use it in GitHub Desktop.
Script to get all the elements with a CSS `animation` property declared
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);
@Glad2Design
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment