Lesson 48 of 50
cssCSS for Performance – Avoiding Layout Thrash
9 mins
Course progress96%
What you'll learn
Keep this idea in mind as you work through the lesson.
Lesson 48 of 50
css9 mins
Keep this idea in mind as you work through the lesson.
Layout thrashing occurs when JavaScript reads layout properties (offsetWidth) then writes styles that cause a reflow.
requestAnimationFrame.contain to limit reflow scope..widget { contain:layout style; }