Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / what-forces-layout.md
Last active August 2, 2025 07:28
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
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active July 22, 2025 10:47
Backend Architectures Keywords and References
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 12, 2025 14:05
A badass list of frontend development resources I collected over time.
@madrobby
madrobby / gist:4161897
Created November 28, 2012 15:16
Retina screen media query
@media (min--moz-device-pixel-ratio: 1.5),
(-o-min-device-pixel-ratio: 3/2),
(-webkit-min-device-pixel-ratio: 1.5),
(min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi),
(min-resolution: 1.5dppx) {
/* Retina rules! */
}

A daily glance at what's happening in a high velocity codebase, thanks to @defunkt:

https://github.com/your/repo/compare/master@{yesterday}...master

Bookmark, share, and enjoy.