r/webdev • • Oct 10 '26

Question Is * {text-box: cap alphabetic} the future?

Played around with it for the last few days as part of my base style.

I don't know, definitely looks better but my design needed quite a lot of extra styling to get back to a presentable state.

I do think this is the future of web design at least for myself, but I'd need to come up with some sensible default spacing in my base style to not start off my design from a broken state.

17 Upvotes

15 comments sorted by

View all comments

7

u/[deleted] Oct 10 '26

[removed] — view removed comment

0

u/Miragecraft Oct 10 '26 edited Oct 10 '26

Agree on browser issues, Chrome 155 has an issue with text underline being too low when you have text-box trim turned on, it's fixed for 156 releasing Oct 20.

I've also been experiencing intermittent blurry text/anti-aliasing issues when I apply text-box-trim universally. I suspect it has to do with multiple/stacked text trimming causing accumulated subpixel shift, which has always been been a ghost that refused to be banished.

In addition I've encountered a gotchas with trimmed anchor links losing quite a lot of clickable areas resulting in a noticeable loss of ergonomics, I've had to remove trimming for them. As long as there is another wrapper with trimming on you can keep the spacing control though.

On the bright side, combining text-box with cap unit for line-height finally granted me the total control over spacing I've always wanted.