Hacker News new | ask | show | jobs
by alberth 656 days ago
Typography is so difficult on the web due to lack of support for things CSS textbox-trim

https://github.com/jantimon/text-box-trim-examples

You can see that even on this website, if you click "Debug Mode" (top right) and notice that later in the page, the headings and body copy begin to drift out of vertical alignment (against the background grid).

2 comments

That type of font/textbox issue is my #1 gap in modern CSS.

Honestly I'm surprised that it wasn't addressed long ago, seems like such a foundational issue for rendering text.

Well it's actually the font designers at fault here and not a CSS issue.

See more here: https://tonsky.me/blog/centering/

But so much time is being wasted on developers fine tuning magic numbers that the browsers are extending CSS to automatically fix the font developer's mistakes.

Wow something Safari has already built and others haven’t.
Typography improvements are always pretty high on Apple's priority list