Re: [csswg-drafts] [css-images?] Let’s fix icons on the Web! Aka a way to pass currentColor and other context to linked SVGs (#9872)

>  something that can be implemented more easily than the full-blown params proposal.

All that Params does is set the initial value of variables. It's the exact same feature as what you're proposing, just affecting a different set of things, so they should be equally easy or difficult.

> Agreed but this seems like a whole different feature (and far more complicated to define in a way that doesn't clash with existing params).

Right, this is work Params has already done, so there's no need to do additional work. Just write `<img "icon.svg#param(currentcolor, font-size, --shadow-color blue)">` to pass in the currentcolor and font-size from the element, and set the --shadow-color variable to `blue`.

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


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

Received on Sunday, 28 January 2024 20:26:21 UTC