Re: [csswg-drafts] [css-values-5] Introduce nth-item() (#11103)

The CSS Working Group just discussed `[css-values-5] Introduce nth-item()`, and agreed to the following:

* `RESOLVED: Add an nth-item() function. Cycling TBD`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> TabAtkins: we already accepted random-item() function, which takes a list and resolves to an item in the list randomly<br>
&lt;fantasai> TabAtkins: proposal is to pair this with nth-item(), which is the same, but not random -- you give an index into the list<br>
&lt;fantasai> TabAtkins: This allows you to have sets of properties controlled by a single variable<br>
&lt;fantasai> TabAtkins: among othe things<br>
&lt;fantasai> TabAtkins: Now that we have numerical comparisons, this could be done with if()<br>
&lt;fantasai> TabAtkins: But nth-item() seems useful as a smaller syntax, and because it's directly analogous to random-item()<br>
&lt;kizu> +n to this<br>
&lt;lea> +n from me too :D<br>
&lt;miriam> +1<br>
&lt;TabAtkins> `random-item(fixed .1, a, b, c, d)` returns the first one, for example<br>
&lt;miriam> +foo<br>
&lt;fantasai> astearns: objections?<br>
&lt;fantasai> lea: Does it cycle?<br>
&lt;fantasai> fantasai: good question<br>
&lt;fantasai> RESOLVED: Add an nth-item() function. Cycling TBD<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11103#issuecomment-2770582816 using your GitHub account


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

Received on Tuesday, 1 April 2025 20:16:34 UTC