Skip to content

Instantly share code, notes, and snippets.

View alex-ketch's full-sized avatar

Alex Ketch alex-ketch

View GitHub Profile
@Princesseuh
Princesseuh / Image.astro
Last active January 30, 2022 04:13
Astro + eleventy-img
---
import Image from "@11ty/eleventy-img"
import { generateImage } from "utils.ts"
import { Markdown } from "astro/components"
const {
src,
alt,
caption,
options = {},
sizes = "",
@paulirish
paulirish / what-forces-layout.md
Last active June 26, 2024 20:47
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
@pascalpoitras
pascalpoitras / config.md
Last active June 23, 2024 15:33
My WeeChat configuration

WeeChat Screenshot

Mouse


enable