Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am arggh on github.
  • I am arggh (https://keybase.io/arggh) on keybase.
  • I have a public key ASD_z-DCfdWw3cqmd1PlRXkoGt95ruzTAfYKoB8T1osGyQo

To claim this, I am signing this object:

@arggh
arggh / rollup.config.js
Created August 10, 2019 15:26
Svelte Rollup config
import svelte from 'rollup-plugin-svelte';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import livereload from 'rollup-plugin-livereload';
import { terser } from 'rollup-plugin-terser';
import babel from 'rollup-plugin-babel';
const production = !process.env.ROLLUP_WATCH;
export default {
@arggh
arggh / what-forces-layout.md
Created January 13, 2017 07:23 — 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()