Typography<p>The two most needed CSS properties for better web typography are Text-Box-Trim, as well as Margin-Trim<p>Please browser dev’s, implement both of these.<p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-trim" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/CSS/margin-trim</a><p>—-<p>Here’s a JS hack in the mean-time:<p><a href="https://seek-oss.github.io/capsize/" rel="nofollow">https://seek-oss.github.io/capsize/</a>
Related blog post, that was recently submitted to HN: Hardest Problem in Computer Science: Centering Things (<a href="https://tonsky.me/blog/centering/" rel="nofollow">https://tonsky.me/blog/centering/</a>).<p>This feature would fix alot of the problems with centering fonts (icon and text) vertically, which is currently not really possible, at least not easily.
This will be very useful, especially for vertical aligning, but as of today is essentially unsupported:<p><a href="https://caniuse.com/css-text-box-trim" rel="nofollow">https://caniuse.com/css-text-box-trim</a>
I hope this will finally stop developers from setting line-height: 1; on text inputs which cuts off the top and bottom parts of some letters. Even Google developers make this mistake.
FINALLY!!<p>For 12 years visually vertically centreing text has required adding a padding or margin of a few pixels to the bottom or top, now (when adopted) it can be done properly.
Much needed feature for typography! The biggest pain is when I need to visually vertically center a text with an icon. If you have an [ICON] followed by upper case character (e.g. Hello), the (H) will always visually look too high to be vertically centered with the [ICON] because the actual height of the text that is calculated always account for hanging characters like "g, y", etc.
I had always wondered why Figma supports this when there doesn’t appear to be any support for it in the wild (web or native). Nice to see the W3C draft is looking fairly mature at this point.
Okay, but first let's wait for 10 years until it's going to be supported by every device out there.<p>Bookmarked, will get back to it in 10 years.