W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2018

Re: [csswg-drafts] [css-fonts-4] Feature for making text always fit the width of its parent

From: jonjohnjohnson via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Apr 2018 23:33:55 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-380627833-1523489634-sysbot+gh@w3.org>
Interested to hear what authors say, but I'm guessing this wouldn't be as simple as a new length value or function like `fit(8px, 48px)` and would probably require a certain `display` (or formatting context) on itself or even it's parent, or maybe require use of `contain` when an elements size is often affected by the size of it's content. What about other writing modes? What about `width: 25em`? Seems like your ask would require use of ONLY font-size relative `letter-spacing`? I just don't see this feature offering as much use as it's worth fleshing out, let alone implementor interest, when it only takes two passes in js to get/set either `font-size`, `transform`, or use svg replacement. Or, knowing your general font metrics (using `@font-face`) and layout (at breakpoints) to set font-size in `vw` units. Also, remember `min()` & `max()` are coming and already in Safari Preview [544](http://github.com/w3c/csswg-drafts/issues/544) to play around with. And `clamp()` is being discussed [2519](https://github.com/w3c/csswg-drafts/issues/2519).

-- 
GitHub Notification of comment by jonjohnjohnson
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2528#issuecomment-380627833 using your GitHub account
Received on Wednesday, 11 April 2018 23:33:58 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:28 UTC