Re: [csswg-drafts] [css-values-4] Resolve `<percentage>` representing `<number>` or `<angle>` at parse time (#9395)

Can you please provide an answer for `<angle>` resolved to `<number>`? The question would also apply for any dimension that can be represented as a percentage, but there is no existing case.

The only existing case for `<angle>` is [`conic-gradient()`](https://drafts.csswg.org/css-images-4/#conic-gradient-syntax) but browsers do not support `<percentage>` representing `<angle>`, so interoperability does not need to be considered here.

For example, should the specified value of `conic-gradient(from 50%, blue 50%, yellow)` be `conic-gradient(from 180deg, blue 180deg, yellow)`? I assume it should be `conic-gradient(from 180deg, blue, yellow)` for `conic-gradient(from calc(50%), blue, yellow)` or `conic-gradient(from calc(25% + 90deg), blue, yellow)`.

---

Is it fine to assume that `<percentage>` is resolved before simplifying a calculation tree? This would mean that its step 1.1 (resolve `<percentage>`) is not required.

---

Fwiw, if they cannot be preserved within specified values, I would have preferred percentages to be resolved at serialization time vs. parse time wherever interop requires it, which I assume would imply that `25% + 90deg` would not be simplified, and omitting default number values resolved from percentages clarified wherever required.

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


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

Received on Thursday, 7 December 2023 07:58:32 UTC