Re: [csswg-drafts] [css-mixins-1] Do we really need the `@contents` parameter? (#12946)

We don't *need* it, strictly, but having it gives us better consistency with normal arguments. With normal arguments, while you can omit arguments just fine (the missing ones will take their defaults), you can't provide *more* arguments than the mixin is defined with - it makes the invocation invalid. (Same for custom functions.)

If we didn't have an indicator of a contents-block argument, then, our behavior needs to be inconsistent in some way: either contents block is always valid to pass even if the mixin doesn't expect or use it, or we determine whether a contents block is valid to pass based on whether the mixin *uses* one in its body.

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


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

Received on Tuesday, 14 October 2025 16:46:32 UTC