Skip to content

Instantly share code, notes, and snippets.

@XavierGimenez
XavierGimenez / what-forces-layout.md
Created January 15, 2020 13:43 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@XavierGimenez
XavierGimenez / .block
Last active October 10, 2018 07:54 — forked from mbostock/.block
Static Force Layout + dragging
license: gpl-3.0
@XavierGimenez
XavierGimenez / .block
Created August 10, 2017 14:01 — forked from mbostock/.block
Difference Chart
license: gpl-3.0
@XavierGimenez
XavierGimenez / .block
Last active March 9, 2023 12:09 — forked from mbostock/.block
Grouping nodes in a Force-Directed Graph
license: gpl-3.0
height: 600
@XavierGimenez
XavierGimenez / .block
Last active May 19, 2017 12:43 — forked from armollica/.block
Transcription collection from Inscription, distribution through time
height: 600