Notes
Over the years I’ve published a dev notes — some more noteworthy than others.
Here are some of my personal favorites. I hope you find something useful among them.
The browser already has an event bus. Custom events on window give you emit, subscribe and unsubscribe, and with a few lines of TypeScript they are fully typed.
Read this article →Interactive parts of a mostly static page tend to end up as loose querySelector scripts. One way to give them structure is a component class per element, started by a small init system.
Read this article →A small sharp-cli script that generates optimized PNG/JPEG, AVIF, and WebP versions of images while keeping the originals untouched.
Read this article →Practical patterns for building smaller, faster, and more secure production Docker images.
Read this article →A palette → semantic → component architecture for CSS custom properties. The rules that decide where each value belongs.
Read this article →Global border-box is sold as a layout fix, but the downsides are real — and "just document it" doesn't save you when nobody reads docs until something breaks.
Read this article →