Re: [csswg-drafts] [css-values] random() function (#2826)

What would happen in case of unclear integers, e. g. `rand-int(foo, 10pt, 5mm)`?

Could this be solved with counters instead, which are always integers? `counter-shuffle: foo, bar 5, baz 1 5;` would set _foo_ to a random value between (initial) 0 and its current value, _bar_ to a random value between 0 (or its current value?) and 5, and _baz_ to a random value between 1 and 5. For this to work, of course, counters must be legal inside `calc()`. 
`random(id, a, b)` would require _a_ and _b_ to be the same dimension and yield a random value between them. Rounding functions have already been proposed to deal with finer nuances, e. g. `round(random(10pt, 5mm, foo), 1px)`.

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

Received on Friday, 18 January 2019 13:39:26 UTC