Re: [csswg-drafts] [css-mixins] custom mixins & functions should have some access to custom properties on the calling element. How much? (#9938)

> I think a common workflow for mixins is to start developing CSS normally, then copy certain code into a mixin. Using a separate syntax makes this higher friction.

I partially agree, but an `arg(` -> `var(` replacement is simple; and when I imagine myself in the future where mixins are available, the point where you think “oh, now I need a mixin instead” might come early enough that there won't be a lot of things to replace.

Then, for mixins, if the variables are transparent, then copying the code will work naturally: arguments will be only necessary when you'd want to explicitly separate them from variables.

I'd imagine having to mention every used variables in `using` might create a much bigger friction than replacing some with `arg()`.

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


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

Received on Friday, 23 February 2024 19:11:16 UTC