Skip to content

Commit 35b2c3c

Browse files
andruudAnders Hartvoll Ruud
andauthored
[css-mixins-1] Check default values against the parameter type (#12243)
Co-authored-by: Anders Hartvoll Ruud <[email protected]>
1 parent 255b1f4 commit 35b2c3c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

css-mixins-1/Overview.bs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,17 @@ and optionally a <dfn>default value</dfn>.
201201
<<declaration-rule-list>>
202202
}
203203
204-
<dfn><<function-parameter>></dfn> = <<custom-property-name>> <<css-type>>? [ : <<declaration-value>> ]?
204+
<dfn><<function-parameter>></dfn> = <<custom-property-name>> <<css-type>>? [ : <<default-value>> ]?
205205
<dfn><<css-type>></dfn> = <<syntax-component>> | <<type()>>
206+
<dfn><<default-value>></dfn> = <<declaration-value>>
206207
<dfn function lt="type()" for="@function">&lt;type()></dfn> = type( <<syntax>> )
207208
</pre>
208209

210+
If a [=default value=] and a [=parameter type=] are both provided,
211+
then the [=default value=] must [=CSS/parse=] successfully
212+
according to that [=parameter type=]'s syntax.
213+
Otherwise, the ''@function'' rule is invalid.
214+
209215
<h4 id=function-preamble>
210216
The Function Preamble</h4>
211217

0 commit comments

Comments
 (0)