- From: Brandon McConnell via GitHub <sysbot+gh@w3.org>
- Date: Tue, 08 Apr 2025 23:45:05 +0000
- To: public-css-archive@w3.org
@tabatkins @fantasai @mirisuzanne I was just poking around the FPWD section for this ([css-values-5/#randomness](https://www.w3.org/TR/css-values-5/#randomness)), and I noticed that it only mentions comma separators (`,`), but earlier in this proposal, we had discussed the option to use semicolon (`;`) separators for times where you might want to random select between lists of comma-separated lists. @Crissov mentioned this again here: > 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. A proposal I opened in Feb 2023 ([[css-values-5] Add spread() to CSS #8391](https://github.com/w3c/csswg-drafts/issues/8391)) also referenced precisely this functionality. Can we revisit this to discuss the use semicolon delimiters (even optionally), or an alternative method for grouping lists like these? -- GitHub Notification of comment by brandonmcconnell Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2826#issuecomment-2787883333 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 8 April 2025 23:45:05 UTC