DEV Community

Discussion on: My New Favorite CSS Trick: will-change

Collapse
 
mardeg profile image
Mardeg

Will this be useful for SMIL animated inline SVG elements?
If I have a circle element that will move vertically and change transparency should I add will-change: cy, fill-opacity; to the CSS for it?

Collapse
 
highflyer910 profile image
Thea

Yes, will-change can be very useful for optimizing animated SVG elements. For your example of a circle moving vertically with changing opacity, adding will-change: cy, fill-opacity; to that circle is an appropriate use case.