Re: [csswg-drafts] [css-mixins] Improve ergonomics of `using` by allowing wildcards (#10954)

> @andruud, any thoughts?

I'm not sure we should have `using` at all. It's basically "dynamic scoping" (especially your most recent proposal). Getting your variables bound to a "random" place in the call stack sounds like it will make complex call trees unpleasant to reason about, and I don't think that opting in certain variable names to this behavior helps either.

> The problem is that a function doesn't know what theming variables its own called functions will want to use

That problem exists because we have `using` in the first place.

---

-  We could drop `using`, treat the element variables as "global", and make them always available in all functions (shadowed by locals, obviously).
- Or, we could make `using` apply to the the element variables _only_. Passing values from one function to the next would then happen in a civilized manner, i.e. with regular parameters only.

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


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

Received on Friday, 27 September 2024 12:13:48 UTC