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

The CSS Working Group just discussed ``[css-mixins-1] Do we really need the `@contents` parameter?``, and agreed to the following:

* `RESOLVED: remove @contents block from the args list`
* `RESOLVED: always allow passing @contents block`

<details><summary>The full IRC log of that discussion</summary>
&lt;ydaniv> TabAtkins: currently in the spec, mixins can take number of args<br>
&lt;ydaniv> ... can also take a nested block, you can sub that in mixin<br>
&lt;ydaniv> ... with media query to apply, other reasons as well<br>
&lt;ydaniv> ...  question here is how to declare how this is done<br>
&lt;lea> q+<br>
&lt;ydaniv> ... the current spec is how you declare the argument in the list, you declare the contents in the args list as well<br>
&lt;ydaniv> ... some ppl don't see the point of this, other than declaring, current spec doesn't allow other things to do<br>
&lt;ydaniv> ...  like typing<br>
&lt;ydaniv> ... literaly it's just about declaring the contract<br>
&lt;ydaniv> ... but enough ppl are not liking this and we'd like to make it be passable all the time, so maybe remove it from args list<br>
&lt;ydaniv> ... if you do pass it then allow but doesn't do anything<br>
&lt;ydaniv> ... there are suggestions to retain some of it, like to allow passing ony if  mixin uses one<br>
&lt;ydaniv> ... like for debugging by replacing contents,<br>
&lt;ydaniv> ... if we wannt go this way, than not objecting to always alllow passing it<br>
&lt;lea> q-<br>
&lt;ydaniv> ... so proposing removing it from args list and always allow passing<br>
&lt;lea> I was just in the queue to +1 but if there are no objections, there's no point to spending time arguing why the +1<br>
&lt;kizu> +1<br>
&lt;lea> +1<br>
&lt;kbabbitt> +1<br>
&lt;miriam> +1<br>
&lt;ydaniv> miriam: +1<br>
&lt;ydaniv> proposed resolution: remove @contents block from the args list<br>
&lt;ydaniv> lea: if you don't use it in the mixin it's empty<br>
&lt;kizu> q+<br>
&lt;ydaniv> TabAtkins: yes<br>
&lt;ydaniv> astearns: seeing approvements<br>
&lt;astearns> ack kizu<br>
&lt;ydaniv> kizu: if you have a mixin with @contents that have some malformed decls inside, if you call it without braces then it's replaced by the content<br>
&lt;ydaniv> TabAtkins: correct<br>
&lt;ydaniv> lea: would be nice to have [missied]<br>
&lt;ydaniv> s/[missed]/fallback specified with @contents/<br>
&lt;lea> s/[missied]/a way to pass default contents to be used when the mixin is used without contents/<br>
&lt;ydaniv> astearns: other things to add?<br>
&lt;lea> scribe+<br>
&lt;ydaniv> ... obejctions?<br>
&lt;lea> TabAtkins: there is, you just add a block<br>
&lt;ydaniv> RESOLVED: remove @contents block from the args list<br>
&lt;ydaniv> astearns: objections to always allowing to pass @contents block?<br>
&lt;ydaniv> RESOLVED: always allow passing @contents block<br>
</details>


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


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

Received on Friday, 14 November 2025 05:58:45 UTC