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

Fair. After all, design systems could simply use variables to map keys to indices. E.g.:

```css
:root {
 --color-accent: #edf2ff, #dbe4ff, #bac8ff, #91a7ff, #748ffc, #5c7cfa, #4c6ef5, #4263eb, #3b5bdb, #364fc7;
 --lightest: 1;
 --medium: 5;
 --darkest: 10;
}

.foo {
 background: item(var(--color-accent), var(--lightest)); /* #edf2ff */
 background: item(var(--color-accent), var(--medium)); /* #748ffc */
 background: item(var(--color-accent), var(--darkest)); /* #364fc7 */
}
```

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


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

Received on Monday, 21 July 2025 18:25:48 UTC