Dev log
Reduce motion: kinder animations for every visitor
Site animation is nice, but it makes some people dizzy. Keep your motion, let people turn it off, and switch it off for anyone who asks. Here's how.
7 min read
Tag
javascript
Dev log
Reduce motion: kinder animations for every visitor
Site animation is nice, but it makes some people dizzy. Keep your motion, let people turn it off, and switch it off for anyone who asks. Here's how.
7 min read
Dev log
Build a scroll ruler sidebar with letter-by-letter titles
Section titles that ride a ruler and swing into place one letter at a time, rebuilt from the ArtCraft site with CSS and a short script.
10 min read
Dev log
CSS anchor positioning: move elements on hover, no JavaScript
Give the hovered element an anchor-name, make another element follow it with position-anchor, and add a transition. It slides there, no JavaScript.
8 min read
Dev log
Replace text in a string with JavaScript
replace() changes the first match. replaceAll() or a regex with the g flag changes every match. Also case-insensitive swaps, $ patterns and escaping input.
4 min read