- From: Alan Stearns <stearns@adobe.com>
- Date: Wed, 5 Mar 2025 00:42:41 +0000
- To: Hiroya UGA <hiroya.uga@gmail.com>, "www-style@w3.org" <www-style@w3.org>
- Message-ID: <SA1PR02MB849320980DA8969EC0302DEAB4CB2@SA1PR02MB8493.namprd02.prod.outlook.com>
Hello, We only use this mailing list for announcements these days. Technical discussions happen in GitHub issues in our repo at https://github.com/w3c/csswg-drafts You may want to add a comment to this related issue: https://github.com/w3c/csswg-drafts/issues/2528 ([css-fonts-4] Feature for making text always fit the width of its parent) Thanks, Alan From: Hiroya UGA <hiroya.uga@gmail.com> Date: Monday, March 3, 2025 at 6:07 PM To: www-style@w3.org <www-style@w3.org> Subject: [css-fonts-4] Extension of font-stretch property I'd like to expand the values of `font-stretch` property. Name: font-stretch New Values: fit-content | fit-content(<length-percentage>) | fit-container Computed Value; specified keyword `fit-content` The text is rendered using a normal font face, but the font will be condensed to fit within the container's width. If the font family provides additional condensed or expanded faces, the closest available face will be used. Otherwise, the text will be forcibly transformed, similar to CSS Transforms. `fit-content(<length-percentage>)` The font will be condensed to fit within the container’s width, but the level of condensation will not exceed the specified `<length-percentage>`. Negative `<length-percentage>` values are invalid. `fit-container` The font will always scale in the inline direction to fully match the container’s width. If the font family provides additional condensed or expanded faces, the closest available face will be used. Otherwise, the text will be forcibly transformed, similar to CSS Transforms. Initially, I considered extending `text-overflow` and `text-align`, but after reviewing various use cases, I concluded that this behavior should be an extension of `font-stretch` instead. Given the possibility that `font-stretch` may eventually be renamed to `font-width`, I am concerned that the behavior of the `fit-content` argument may differ from its usage in `width` and `grid`. However, I would like to share this proposal as one possible idea. If similar discussions have already taken place, I apologize. I would appreciate it if you could share relevant threads. FYI: I have reviewed discussions such as the following: https://lists.w3.org/Archives/Public/www-style/2011Jan/0281.html Sorry if this was sent as a duplicate. Thank you for your consideration.
Received on Wednesday, 5 March 2025 00:42:48 UTC