Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Show comment
Hide comment
@Glad2Design

Glad2Design Mar 2, 2018

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!

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