|
Improving Site Performance by Shipping More CSS — GitHub details how it spent three years purging styled-components and 'CSS-in-JS' from github․com in favor of CSS Modules. The result? Shipping more CSS, but GitHub reports 55% less time to server-side render a page.
Josh Black and Marie Lucca (GitHub)
|
💡 CSS Modules isn't a browser feature or standard, but a widely supported bundler convention where classes in a .module.css file get rewritten to unique names, scoping styles per file with no runtime cost. |
|
How Anthropic Made Claude's Web App Faster — The tale of how a recent sprint (with Claude doing much of the work) cut Claude's time-to-typeable at the 75th percentile from 3.1s to 0.55s, from tracking layout shifts too small for CLS to flag, to a :root:has() selector costing 24ms per DOM change, and a jump caused by Chrome pre-rendering the page at the wrong height.
Wang, Attard, and G (Anthropic)
|
|
📙 Articles, Opinions & Tutorials
|
|
Detect When Elements Overlap with CSS — A neat bit of CSS lateral thinking to detect when two elements get too close or overlap, no JavaScript needed. It combines anchor positioning, style container queries, and scroll-driven animations, using an overflowing 'measure' element as the trigger.
Ahmad Shadeed
|
|
Extracting Grid Information Using CSS — A neat CSS-only proof of concept technique where you can get information about a grid structure (number of columns/rows, where items sit on the grid, etc). The technique relies on scroll-driven animations, oddly enough.
Temani Afif
|
|
The Interface Cheat Sheet — A helpful illustrated list of good UI advice, touching on points from border radiuses and transitions to the use of color, scaling and accessibility.
Jakub Krehel
|
|
Custom Attributes Polyfill — A polyfill for the proposed Custom Attributes spec, letting you attach reusable behaviours to any element via custom attributes with their own lifecycle hooks.
Keith Cirkel
|
|
Fluid Typography — Donnie argues that because container widths are unpredictable, using container queries to drive fluid font sizing isn't the right choice. He suggests we stick with viewport units to retain true control.
Donnie D’Amato
|
|
🧰 Tools, Code & Resources
|
|
Make Your Logo Brighter Than White — If you've got an HDR display, this browser-based tool will quickly make its trick clear. Drop in your logo, choose which colors should glow, and get an HDR version ready to download. Claims to make things up to 7.5x brighter in Chrome and Safari.
Chris Bennett
|
|
Here's a kinda crude font foundry that takes two web fonts and mixes their glyphs, with unsettling results. I mean, why not make a Times New Roman/Comic Sans hybrid to catch folks off guard? And, yes, you can download the end result.
|
|