I was recently got a console warning in Chrome on a client’s website stating that:
SVG’s SMIL animations (‘animate’, ‘set’, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead.
The site contains an SVG logo that has a simple rotating animation and was implemented using SMIL, and I certainly don’t want it to go away. Switching over to a CSS based animation will be relatively simple, and I should have animated it that way in the first place.
Why is SMIL being deprecated?
While I’m personally indifferent to deprecating SMIL (I haven’t used it much and prefer to work with CSS animations) it’s a good question to ask why. According to Google, it boils down to implementation. SMIL hasn’t been implemented in all major browsers and Google would like to focus on CSS and Web animations instead.
Read the announcement here: Intent to deprecate: SMIL
What if I still need it?
I plan on updating the SVG logo to use CSS, but what if your project is still dependent on SMIL? There’s a polyfill for that: https://github.com/ericwilligers/svg-animation