Re: [csswg-drafts] [css-values-5] Should progress functions have a calculation tree as their internal representation? (#10979)

The `calc()` unwrapping can also happen when serializing it as a component of a declared value, when its contents is a single math function.

`progress()` is a math function so as a component of a declared value, `calc(progress(1em from 1px to 20px))` serializes with `progress(1em from 1px to 20px)`. On the other hand, `container-progress()` and `media-progress()` (and also `sibling-*()`) are not so as a component of a declared value, `calc(container-progress(width from 1px to 20px))` serializes as is.

To be more explicit about how I see this... defining `container-progress()` & co as calculations represented with a calculation tree would allow unwraping them from `calc()`. This would also answer whether `font-weight: container-progress(width from 0px to 1px)` should be clamped to `1000` (the upper bound of `font-weight`), consistently with `progress(1001 from 1 to 1000)`, or invalid.

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


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

Received on Thursday, 17 October 2024 04:46:13 UTC