will-change
noun
say it: “WIL CHAYNJ” /wɪl tʃeɪndʒ/
A CSS property that warns the browser a property, such as transform, is about to animate, so it can get ready. Use it sparingly: every hint costs memory.
What does will-change do?
will-change warns the browser that a property is about to animate, so it can prepare. Use it sparingly: every hint costs memory.
.slide-panel { will-change: transform; }
In a sentence
- “Putting will-change on every element made the page use more memory, so I kept it on the one panel that moves.”
- “I added will-change: transform to the slide-out cart, and its first animation stopped stuttering.”
Level: Master · More CSS terms at this level
Updated