- From: Steinar H. Gunderson via GitHub <noreply@w3.org>
- Date: Mon, 15 Sep 2025 09:27:58 +0000
- To: public-css-archive@w3.org
sesse has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-mixins-1] What happens when a parameter is not given? == The spec says: > If passed a [dashed-function](https://drafts.csswg.org/css-mixins/#typedef-dashed-function), the arguments passed to the dashed-function are mapped to the [mixin’s](https://drafts.csswg.org/css-mixins/#mixin) arguments; if more arguments are passed than the length of the mixin’s argument list, the [@apply](https://drafts.csswg.org/css-mixins/#at-ruledef-apply) application does nothing. (Passing too few arguments is fine; the missing arguments take their default values instead.) However, what if the missing arguments do not have default values? I can see three different interpretations: 1. The entire `@apply` call is invalid, and is ignored (whether the parameter is ever used or not). 2. Missing default values are treated as no `@env` for that parameter at all. This means you can use them in fallbacks (`env(--missing-argument, blue)` will return `blue`), but `env(--missing-argument)` with no fallback will be IACVT (unless an `@env` with the same name has been declared higher up in the chain, possibly by another mixin). 3. Missing default values are treated as an `@env` with the guaranteed-invalid value, so you can use them in fallbacks like above _but_ they will shadow any previous `@env` with the same name. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12796 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 15 September 2025 09:28:00 UTC