Skip to content

Instantly share code, notes, and snippets.

View tomsturge's full-sized avatar

Tom Sturge tomsturge

View GitHub Profile
{
"bold_folder_labels": true,
"caret_style": "phase",
"close_windows_when_empty": true,
"color_scheme": "Packages/User/base16-ocean.dark (SL).tmTheme",
"detect_indentation": false,
"dictionary": "Packages/Language - English/en_UK.dic",
"find_selected_text": true,
"font_size": 12.0,
"highlight_line": true,
@tomsturge
tomsturge / what-forces-layout.md
Created September 23, 2015 10:21 — 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()
### Keybase proof
I hereby claim:
* I am tomsturge on github.
* I am tomsturge (https://keybase.io/tomsturge) on keybase.
* I have a public key ASBGEo_qKxqZS3cBlWD4HwLp2xnpY2bLwSnfHPSlIEsprwo
To claim this, I am signing this object: