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

> Can you please provide an answer for <percentage> resolved to <angle>?

The spec already defines how percentages relative to another value resolve ([step 1.1 of the simplification algo](https://drafts.csswg.org/css-values-4/#simplify-a-calculation-tree)). So, yes, if you used `calc(50%)` in `conic-gradient()`, it would simplify into `calc(180deg)` at computed-value time.

Whether a naked (non-calc()-wrapped) percentage turns into an angle is defined by the context it's in (tho we often forget to explicitly define this stuff). Usually we absolutize values and resolve percentages if possible, at computed-value time. It does look like conic-gradient() doesn't define this, tho.



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


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

Received on Friday, 8 December 2023 21:18:30 UTC