Skip to content

Instantly share code, notes, and snippets.

View tbjgolden's full-sized avatar
🏙️
londinium

Tom Golden tbjgolden

🏙️
londinium
  • Error 401
  • London
  • 10:18 (UTC +01:00)
View GitHub Profile
@tbjgolden
tbjgolden / 1_benchmarks.md
Last active April 26, 2021 18:25
Benchmarks for CSS minifiers 2021 edition
@tbjgolden
tbjgolden / progressive-browserlist-config.md
Last active December 20, 2023 12:10
Low-effort, high-reward browserlist config to avoid vendor prefix hell

Low-effort, high-reward browserlist config to avoid vendor prefix hell

(Stats used from 2022-06-20)

chrome >= 79, and_chr >= 81, safari >= 13, ios_saf >= 12.4, firefox >= 73

...or more generally

[
@c7x43t
c7x43t / deepCopy.js
Last active May 25, 2020 19:16
Deep Copy an object very fast
// deep copy:
// String, Number, undefined, null, Set, Map, typed Array, Object, Boolean, RegExp, Date, ArrayBuffer, Node
// Functions, Properties of types: (Primitive, Symbol)
// shallow copy (by reference):
// WeakMap, WeakSet, Symbol
// increased compatibility: IE, Node
var $jscomp = $jscomp || {};
$jscomp.scope = {};
$jscomp.ASSUME_ES5 = !1;
$jscomp.defineProperty = $jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties ? Object.defineProperty : function(a, b, c) {
@paulirish
paulirish / what-forces-layout.md
Last active July 25, 2025 17:01
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.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent