Re: [csswg-drafts] [css-fonts-5] Text Fitting: Scaling of things based on font-size (#12888)

I think we need to agree on whether the scaling of the font-size by this feature should affect the [computed value](https://drafts.csswg.org/css-cascade-5/#computed) or the [used value](https://drafts.csswg.org/css-cascade-5/#used). As a browser vendor, we lean toward adopting the used value approach.

## Used Value Approach

If we choose the used value:

* It would be difficult to calculate the scaling factor if we need to scale only font-relative values, and it would be difficult to scale only the font-relative values of various properties because we have only computed values during the layout step. It would likely be a choice between two outcomes:
  * "Nothing, including font-relative values, is scaled."
  * "Everything, including absolute values, is scaled."
* The result of `window.getComputedStyle()` will not be affected.
* The implementation complexity should not be high.

## Computed Value Approach

If we choose the computed value:
* Due to the precedent set by [container queries](https://drafts.csswg.org/css-conditional-5/#size-container), it may be possible to recompute styles during the layout step.
  *  It would be easy to update the font-relative values of various properties.
* Calculating the scaling factor during the layout step would be difficult because we have only computed values during the layout step.
* The result of `window.getComputedStyle()` will be affected. When a single inline element is split across multiple lines, applying a `per-line` scaling could result in a different computed value for each line.  We need to define `getComputedStyle()` behavior in such case.
* The implementation complexity is expected to be quite high.



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


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

Received on Thursday, 9 October 2025 03:26:06 UTC