Re: [csswg-drafts] map-get function proposal for customising web component styles (#7273)

@Loirooriol 

> This is like the `nth-value()` function discussed in [#5009 (comment)](https://github.com/w3c/csswg-drafts/issues/5009#issuecomment-626072319)
> [snip]

Once we have `if()`, we don't need to change the user-facing API, we can just do:

```css
my-button {
 --size: small;
}

button {
 --size-index: if(--size: small, 1, if(--size: regular, 2, if(--size: large, 3)));
 padding: nth-value(--size-index, ...);
}

```



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


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

Received on Monday, 13 February 2023 16:02:50 UTC