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: nothing moves
reflow: neighbour moves
Compare a repaint with a reflow

One of 40 cards in the JavaScript deck. Browse every card.