Re:CSS Text Box Trim
by k4rli on Friday May 03, 2024 @11:50AM
(#40249042)
Are the features actually useful though? Surely there's a reason why only Safari has them. This textbox trim seems like a fix for badly made fonts
[ Parent
| on HN ]
Re:CSS Text Box Trim
by robinson7d on Friday May 03, 2024 @11:58AM
(#40249155)
It depends on what one considers useful.
E.g. they were also first to support the `:has()` selector/pseudo-class, which I think can be useful for avoiding JS in some cases.
> This textbox trim seems like a fix for badly made fonts
That's not what it is. It's a typographic control that wasn't available in browsers before. It's got nothing to do with fonts being badly made. All textboxes (no matter which font) can be measured from many different places, and this lets you specify (via text-box-edge) which of those many different places you want to consider as the bounds of a specific textbox.