Skip to content

Commit 69a9856

Browse files
authored
[css-mixins-1] Explain comma-containing values as single argument (#11451)
1 parent b125fb5 commit 69a9856

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Diff for: css-mixins-1/Overview.bs

+14-2
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ Its syntax is:
225225
--*( <<declaration-value>># )
226226
</pre>
227227

228-
Issue: Mention semicolon upgrades.
229-
230228
A <<dashed-function>> can only be used where ''var()'' is allowed.
231229

232230
If a property contains one or more <<dashed-function>>s,
@@ -334,7 +332,21 @@ Evaluating Custom Functions {#evaluating-custom-functions}
334332
:: The |parameter|'s [=default value=].
335333
</dl>
336334
3. Return |value|.
335+
</div>
337336

337+
<div class='example'>
338+
A [=comma-containing productions|comma-containing value=]
339+
may be passed as a single argument
340+
by wrapping the value in curly braces, <code>{}</code>:
341+
342+
<pre class='lang-css'>
343+
@function --max-plus-x(--list, --x) {
344+
result: calc(max(var(--list)) + var(--x));
345+
}
346+
div {
347+
width: --max-plus-x({ 1px, 7px, 2px }, 3px); /* 10px */
348+
}
349+
</pre>
338350
</div>
339351

340352
<div algorithm>

0 commit comments

Comments
 (0)