Re: [csswg-drafts] [css-values] Proposal for a 'progress' function to calculate progress between two <length> values (#7268)

> as a developer I would much prefer having support for diving two lengths in calc() (which only Safari supports today)

The two do not block each other, so we can have both.

> Additionally, the proposal for custom functions in CSS subsumes this proposal IMO. 

While it's great that we're soon to have custom functions support on the web, that doesn't negate the need for convenience functions for useful things. It's good to have shared concepts for people to use.

> This is a small convenience around scalar division in calc() and I think standards should start by focusing on flexible primitives at first.

The *standards* already did all that, years ago. We, the CSSWG, don't have control over how browsers choose to prioritize and order things. We can, at best, suggest what we think might be useful, but it's up to them to decide on what to spend engineer-hours on.

> If something like this has to ship, perhaps a function with a name like range-map() might make more sense?

Take a look at [`calc-interpolate()`](https://drafts.csswg.org/css-values-5/#calc-interpolate) ^_^:

```css
font-size: calc-interpolate(100vw, 375px: 24px, 1920px: 32px);
```

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


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

Received on Thursday, 26 June 2025 19:52:53 UTC