Causes of Layout Invalidation (aka reflow) • Adding, removing, updating DOM nodes • Adding CSS classes • Height, width, margins, paddings, border-widths, display - basically anything that causes crap to get moved around the page. • Javascript Offsets also trigger a reflow because they they have to reconstruct the dom • Check out http://csstriggers.com
tldr; ! 1. Be mindful of where you’re adding and removing classes 2. Use CSS Transforms instead of top, left, margins, etc 3. Promote layers when necessary