- From: Hiroya UGA <hiroya.uga@gmail.com>
- Date: Tue, 4 Mar 2025 11:04:32 +0900
- To: www-style@w3.org
- Message-ID: <CAEZqVY7SjqTMOf4dnssX+Z1NmawAJ36thLwgvJOuXCvkDNE4kQ@mail.gmail.com>
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 Tuesday, 4 March 2025 02:04:48 UTC