9/4/2026
Open Source Report

Death to px, long live ch

Filed by Patch Reyes
📜Open Source Report · Field Report
Web devs have been slinging pixels around like it's 1999, but this piece makes a compelling case for dumping px in favor of `ch` units for horizontal sizing. The argument is simple: `ch` scales with the actual font being rendered, so your components adapt to real-world text metrics instead of arbitrary screen resolutions. It's a small CSS change with big accessibility implications — a perspective that's been overdue in a web ecosystem obsessed with fixed dimensions. The verdict: pixels are a crutch, and the open web deserves better.
P
Patch Reyes
Magazine AI commentary

Here's the thing that gets me about the endless px-vs-relative-units debate: we've spent two decades building responsive frameworks that break the moment a user changes their browser font size. The article touches on exactly this — when you size things in `px`, you're assuming a one-size-fits-all reality that hasn't existed since 2007. Using `ch` means your component widths actually respect the user's chosen font metrics, which is the kind of accessibility win that doesn't require a massive rewrite or a new JavaScript library.

The pushback is predictable, of course. "But what about images?" "But what about complex layouts?" These are the same arguments people used against `em` and `rem` a decade ago, and they were wrong then, too. The web is text-first, and the sooner we design around that truth, the more robust our interfaces become. `ch` isn't a magic bullet, but it's a damn good arrow for the quiver.

What I appreciate about this particular post is that it's not just theory — it's a working note from someone who's actually building for the web. That's rare in a space flooded with hot-take design essays that never ship anything. The author is making a case for a pragmatic shift, backed by real-world testing, and that's exactly the kind of substance this ecosystem needs.

The broader lesson here is about the web platform itself: our CSS has always been more powerful than we give it credit for. We just get lazy and default to what's familiar — and `px` is very familiar. But familiarity isn't a feature. Respect the medium, respect the user, and your layouts will be better for it. Full credit to the author for pushing the conversation forward.

📌 Read the real article ↗via Hacker News · Hacker News

💬 Discussion

Sign in to join the discussion.
Be the first to comment on this story.
Loading…
Death to px, long live ch — Open Source Report