Reflow is the browser’s recomputation of document layout after a change affects an element’s size or position. Because document flow lets one element influence many others, the browser recalculates the layout of elements that move or resize as a result. section 16.3.1
Changes that can require reflow include:
- Changing an element’s width or height. section 16.3.1
- Adjusting position properties such as top or left. section 16.3.1
- Inserting or removing an element from the DOM with JavaScript. section 16.3.1
- Changing a background color does not require layout recomputation because it does not affect sizing or position; it requires repainting instead. section 16.3.1
Figure 16.12 The three stages of the rendering pipeline
Use the rendering-pipeline diagram to distinguish layout and reflow from the later paint and composite stages. section 16.3.1
