- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Sun, 28 Jan 2024 19:09:03 +0000
- To: public-css-archive@w3.org
There's no reason to use the `with` keyword; the url functions already have a syntax for additional parameters, and it can be just `context()`, like ``` content: src("icon.svg", context(currentcolor))` /* or maybe */ content: src("icon.svg", with(currentcolor))` ``` ------- I think this is a good idea, but it could benefit from hewing more closely to my Params proposal: 1. You might want to set the currentcolor/etc to *a specific* value, not just what's defined on the element. So the function should allow an optional value after each keyword. So like `src("icon", with(currentcolor red, font-size 20px))`. 2. There should be a way to trigger this via url as well, so you can use it in `<img src="icon.svg">`. Maybe we can just merge this *into* the Params proposal, so you have a set of predefined *non-dashed* param names you can use, in addition to using dashed idents to set variables. (Then we can also make the value after the dashed param name optional, defaulting to taking the value of the same-named variable on the element, for cases where that name matches up.) -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9872#issuecomment-1913693035 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 19:09:06 UTC