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

Instead of separate `random-item()` and `nth-item()` functions, I think I would prefer a single function `choose()`, `select()` or `index()` with parameters `(<index> [to <index>|<index>#]? from <list>)` with something like `<index> = [<int>|random|first|last]` and `<list> = <any-value> [';' <any-value>]*`, so you could also get sub-lists. People would then probably also want `sort()` and `shuffle()` for lists/sets, but that shall be another issue. 

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


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

Received on Thursday, 26 January 2023 22:03:26 UTC