- From: Xiaocheng Hu via GitHub <sysbot+gh@w3.org>
- Date: Thu, 29 Jun 2023 23:29:56 +0000
- To: public-css-archive@w3.org
xiaochengh has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-values-4] Cyclic dependency between `lh` and font-relative units == The [spec](https://www.w3.org/TR/css-values-4/#:~:text=When%20used%20in%20the%20value%20of%20the%20font%2Dsize%20property%20on%20the%20element%20they%20refer%20to) only covers two cases of cyclic dependency: - Font-relative units used in `font-size` - `lh`/`rlh` used in `line-height` There are more cases that are not covered: 1. Font-relative units used in other font properties that affect font selection, e.g., `font-weight: calc(10ex / 1px)` 2. Dependency cycle formed by font properties and `line-height`, e.g., `line-height: 2em; font-size: 1lh` Right now (1) isn't surfaced in any browser because no one supports `calc(10ex / 1px)` yet. But this will also surface if functions like `atan2()` and `sign()` that can convert a `<length>` into a non-length type is properly implemented. This has also been discussed in #8169 For (2), currently Blink and WebKit are breaking the cycle by using parent's line height to compute `fon-size` (see (test case)[https://jsfiddle.net/3rojdnsc/]). Gecko hasn't implemented `lh` yet. I don't have a strong opinion on how exactly the cycle should be broken, and I guess it doesn't matter because there's no real use case with such dependency cycles. We just need a solution for spec completeness. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9018 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 29 June 2023 23:29:58 UTC