- From: Brandon McConnell via GitHub <sysbot+gh@w3.org>
- Date: Wed, 25 Jan 2023 07:55:35 +0000
- To: public-css-archive@w3.org
@smfr I think this spec was discussed previously: ``` nth(<integer>; <value>; <value>; <value>, ...) ``` I agree that it would still be worthwhile to introduce a way to select an item from a list, whether via `nth()`, `calc()`, or by some other means, though personally, I think it would be beneficial to include support for `random-item` as it provides a simpler API for selecting a random item from a list using the same options from random, rather than nesting functions like this: ``` nth(random(per-element, 1, 3, by 1); <value>; <value>; <value>) ``` The benefits include: * simpler API (and similar to `random()`) for selecting a random item from a list, lower bar of entry * you do not need to reference the list's length, which would be required as the max value arg in the nested `random()` function (you'd have to explicitly set `1` and `[max]` values each time you wanted to do something like that) -- GitHub Notification of comment by brandonmcconnell Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2826#issuecomment-1403222475 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 25 January 2023 07:55:37 UTC