Re: [csswg-drafts] [css-fonts-5] Computed value for font-size-adjust (#10292)

> I left a similar concern about the consistency in `from-font` [1]. Can we decouple the computed value for `from-font` from rendering? I mean using a computed/resolved value for rendering but returning the `from-font` keyword for `getComputedStyle()`.
> 
> [1] [#9050 (comment)](https://github.com/w3c/csswg-drafts/issues/9050#issuecomment-1756065407)

I don't see how that could work. According to https://www.w3.org/TR/css-cascade-4/#computed, it's the _computed value_ that gets inherited, so as noted in my comment [above](https://github.com/w3c/csswg-drafts/issues/10292#issuecomment-2108251725), this needs to be resolved to a number (not remain the `from-font` keyword) in order to work as expected in descendant elements.

`getComputedStyle()` sometimes returns a _used_ value that is "further resolved" than the _computed_ value, but I don't think there's any precedent for it to return a "less resolved" value.

The `from-font` value of `text-decoration-thickness` or `text-underline-position` is not really comparable. Given:
```
data:text/html,<div style="font-size: 50px;
                           font-size-adjust: from-font;
                           text-underline-position: from-font">
                   <u style="font-family: Courier New">Courier</u>
                   <u style="font-family: Arial">Arial<u>
```
the two words will have underlines at different positions, because they each get it from their respective fonts (having inherited the `from-font` keyword), but they're expected to apply the same font-size-adjust factor, which they inherit (as a computed number) from the div, so that their ex-heights will be equalized.

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


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

Received on Wednesday, 15 May 2024 12:12:26 UTC