Re: [csswg-drafts] [css-values] Proposal: `round()` to a finite scale (#11067)

Note that https://github.com/w3c/csswg-drafts/issues/11530 would also provide a way to do this. Sure, less elegant, but a lot more manageable over the current situation.
E.g. the example from the first post would look like this:

```css
--primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101;
--primes-count: 26;
--progress: progress(var(--x), var(--primes));
--index: round(var(--primes-count) * var(--progress));
--closest-prime: calc-mix(calc(var(--index) / var(--primes-count)), var(--primes));
```

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


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

Received on Sunday, 19 January 2025 01:07:28 UTC