Skip to content

Instantly share code, notes, and snippets.

View Lexicality's full-sized avatar
😼
🧙‍♂️

Lexi Robinson Lexicality

😼
🧙‍♂️
View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active May 9, 2024 07:00
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
local strchar=string.char
local strfind=string.find
local gsub=string.gsub
local strsub=string.sub
local strlen=string.len
local tinsert=table.insert
local strlower=string.lower
local tremove=table.remove
local format=string.format
local getn=function(x) return #x end
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@nicolashery
nicolashery / solarized-dark.css
Last active March 25, 2022 08:38 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
@flesch
flesch / README.md
Created July 28, 2012 03:44
Fake SCORM API

Fake SCORM API

Some courses won't work outside of an LMS. That's annoying when you just want to review a course, so drop this in to provide a fake SCORM API implementation - getAPI should then pick up this fake API.