Reflow

noun

say it: “REE-floh” /ˈriːfloʊ/

The browser working out again where everything on a page goes and how big it is, after something changes size or position. Doing it too often makes a page feel slow.

What is a reflow?

A reflow is the browser redoing layout after something changes size or position. Doing it too often makes a page feel slow.

// slow: reads and writes in a loop cause a reflow each time
items.forEach(el => { el.style.width = el.offsetWidth + 10 + "px"; });

In a sentence

  • “Animating the sidebar's width caused a reflow on every frame, so the whole page stuttered.”
  • “Changing one item's height in the list triggered a reflow that moved everything below it.”

Level: Master · More CSS terms at this level

Updated