Re: [csswg-drafts] [css-values-5] Maybe min, max and step should not be part of the random-caching-key (#11742)

Uggghhhhh, no, my second bullet doesn't work, because the R's range depends on actually evaluating A, B, and C. I need to phrase it in a way that lets me keep them unresolved.

Unfortunately, even if I'm more explicit about the random int calculation, it doesn't let me switch into the "infinite steps" error case; the calc() would instead hit some infinity degeneracies. Oof, and the first bullet point is bitten by that too - the `calc()` there *also* hits some infinite degeneracies and doesn't have the same argument range controls. Argh, I think I need to just let the first argument be a 0-1 number, in which case we just treat that as the random base value rather than computing one based on the caching options.

That is, `random(.5, 100px, 200px)` will just resolve to `150px`. This syntax wouldn't be designed for authors, and generally wouldn't be seen by authors using `random()` except in the weird case I outlined above. We can even say it has a special keyword of its own that makes it clear it's not for author use, like `random(ua-resolved-value 0.5, 100px, 200px)` or something.

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


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

Received on Thursday, 6 March 2025 01:31:09 UTC