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

Nested `if`s looks a bit difficult to read and too crowded since you repeat `if(--size: {someting}` every time.

In case of using for an index;

```css
--size-index: map-get(small 1, regular 2, large 3, var(--size, regular));
```

vs

```css
--size-index: if(--size: small, 1, if(--size: large, 3, 2));
```

I still find mapping values more readable than if conditions.

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


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

Received on Wednesday, 15 February 2023 10:51:28 UTC