Re: [csswg-drafts] [css-fonts-5] Feature for making text always fit the width of its parent (#2528)

> @PeterCon 
> scanning https://blog.kizu.dev/fit-to-width-discussions-and-feedback/ I gather the thinking about this feature is that it is manipulating text size specifically

Google's explainer also mentions `letter-spacing` and a `scale-inline`, and in the post I also mention other optical axes like the width one. I entirely agree that, ideally, we need to be able to adjust multiple things and not just the text's size. But for this, we will need to define some way to map the _available space_ with the axis (or multiple) in question, and provide a way to mix and sequence them, which can be tricky.

What would be great is to start from something, and iteratively work out things as we go; otherwise we could spend years on trying to come up with a single ideal design.

> I suggest the name be more specific about what is being done: instead of "fit-width", something like "size-to-fit-width".
and
> @querkmachine 
> The prior comment reminds me about the logical-ness of the naming scheme. Should it really be something like fit-inline to account for vertically-oriented languages?

The actual “width” term will not be used in the property. I continue to call it “fit to width” as this is a familiar concept to people, but I tend to agree with the property name proposed in the Google's explainer — `text-grow`.

The idea is that sometimes our text does not fill the entire inline-size of the container, so it can _grow_. The concept is similar to `flex-grow`, and the “grow” part is not tied to the way _how_ the text should grow (via size, width, weight, letter-spacing, anything else, or a mix of those).

-- 
GitHub Notification of comment by kizu
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2528#issuecomment-2848034723 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 2 May 2025 20:15:14 UTC