Styling & Layout

Repaint vs Reflow

A repaint redraws pixels without moving anything (like a color change); a reflow recomputes geometry and is costlier because it can cascade to surrounding elements.

Changing color = repaint; changing width = reflow, then repaint.

repaint · color
reflow · width
Color repaints; size reflows

Tap the example to replay it · press and hold to slow it down

One of 40 cards in javascript flashcards. Browse every card.