- From: Kevin Babbitt via GitHub <noreply@w3.org>
- Date: Tue, 16 Dec 2025 23:59:31 +0000
- To: public-css-archive@w3.org
> @LeaVerou was also talking about more complex examples with if() and so on, which would also allow exfiltrating some of the values to other properties like e.g. z-index. How do you preserve the tainting in that case? What do you return for tainted values?
I get how this would be possible in the future once we have `color-extract()`, e.g.
```css
z-index: color-extract(r from AccentColor);
```
Is there some way to do this today with `if()`? I suppose one could construct something like:
```css
--my-color: AccentColor;
z-index: if(
style(--my-color: rgb(0,0,0)): 0;
style(--my-color: rgb(0,0,1)): 1;
style(--my-color: rgb(0,0,2)): 2;
style(--my-color: rgb(0,0,3)): 3;
/* and so on */
```
Is that what you had in mind? Or is there a more straightforward way to do it?
--
GitHub Notification of comment by kbabbitt
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10372#issuecomment-3662961520 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 16 December 2025 23:59:32 UTC