Article may be outdated

This article is 12 days old. Some details may have changed since publication.

Hacker News·2 min read·hard

Death to px, long live ch

B
Brajeshwar
AI Summary

A developer discusses the limitations of using pixels in web design and advocates for character-based units like 'ch' and 'ex'. The author argues that these units provide better responsiveness and readability across diverse screen sizes.

Why it matters

It reflects a shift in front-end development toward more fluid, content-aware design systems rather than rigid pixel-based layouts.

Dive DeeperCreate a free account to unlock

css design HTML · 2 comments · 400 words · Viewed ~408 times

Pixels are a lie. Even if you think you're drawing something with " pixel perfect " accuracy, your monitor is lying to you. There is no grid of platonically perfect squares.

Note that 1px doesn't necessarily equal one physical device pixel. On HD displays, it may span multiple physical pixels. Similarly, 1cm in CSS often doesn't correspond to one hundredth of SI meter. On a large TV screen, it typically is longer than that. The lengths are perceptual: 16px looks roughly the same on a phone, laptop, or TV screen at typical viewing distance.

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologydesign

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in