@@ -101,27 +101,28 @@ The ''@function'' rule defines a [=custom function=],
101
101
and its syntax is:
102
102
103
103
<pre class="prod def" nohighlight>
104
- @function <<function-name>> [ ( <<parameter-list>> ) ]?
105
- [ using ( <<dependency-list>> ) ]?
106
- [ returns <<type>> ]?
104
+ < @function> = @function <<function-name>> [ ( <<function- parameter-list>> ) ]?
105
+ [ using ( <<function- dependency-list>> ) ]?
106
+ [ returns <<css- type>> ]?
107
107
{
108
108
<<declaration-rule-list>>
109
109
}
110
110
111
111
<dfn><<function-name>></dfn> = <<dashed-ident>>
112
- <dfn><<parameter-list>></dfn> = <<parameter>> #
113
- <dfn><<dependency-list>></dfn> = <<parameter>> #
114
- <dfn><<type>></dfn> = <<syntax-component>> | type( <<syntax>> )
115
- <dfn><<parameter>></dfn> = <<custom-property-name>> <<type>> ? [ : <<declaration-value>> ]?
112
+ <dfn><<function-parameter-list>></dfn> = <<function-parameter>> #
113
+ <dfn><<function-dependency-list>></dfn> = <<function-parameter>> #
114
+ <dfn><<function-parameter>></dfn> = <<custom-property-name>> <<css-type>> ? [ : <<declaration-value>> ]?
115
+ <dfn><<css-type>></dfn> = <<syntax-component>> | <<type()>>
116
+ <dfn><type()></dfn> = type( <<syntax>> )
116
117
</pre>
117
118
118
119
The name of the resulting [=custom function=] is given by the <<function-name>> ,
119
- the [=function parameters=] are optionally given by <<parameter-list>> ,
120
- the [=function dependencies=] are optionally given by <<dependency-list>> ,
121
- and the [=return type=] is optionally given by the <<type>> following the "returns" keyword.
120
+ the [=function parameters=] are optionally given by <<function- parameter-list>> ,
121
+ the [=function dependencies=] are optionally given by <<function- dependency-list>> ,
122
+ and the [=return type=] is optionally given by the <<css- type>> following the "returns" keyword.
122
123
123
124
<div class='example'>
124
- If the <<type>> of a [=function parameter=] ,
125
+ If the <<css- type>> of a [=function parameter=] ,
125
126
[=function dependency=] ,
126
127
or [=custom function=] return value
127
128
can be described by a single <<syntax-component>> ,
@@ -151,9 +152,9 @@ and rules defined later win within the same layer.
151
152
152
153
The <<function-name>> of a ''@function'' rule is a [=tree-scoped name=] .
153
154
154
- If the <<parameter-list>>
155
+ If the <<function- parameter-list>>
155
156
contains the same <<custom-property-name>> more than once,
156
- or if the <<dependency-list>>
157
+ or if the <<function- dependency-list>>
157
158
contains the same <<custom-property-name>> more than once,
158
159
then the ''@function'' rule is invalid.
159
160
@@ -213,8 +214,8 @@ A <dfn><<dashed-function>></dfn> is a [=functional notation=]
213
214
whose function name starts with two dashes (U+002D HYPHEN-MINUS).
214
215
Its syntax is:
215
216
216
- <pre class="prod def " nohighlight>
217
- --*() = --*( <<declaration-value>> # )
217
+ <pre class="prod informative " nohighlight>
218
+ --*( <<declaration-value>> # )
218
219
</pre>
219
220
220
221
Issue: Mention semicolon upgrades.
@@ -231,8 +232,8 @@ When a value is being computed,
231
232
substitution of ''var()'' , ''env()'' and ''attr()''
232
233
must take place <em> before</em> <<dashed-function>> substitution.
233
234
234
- Note: This means arguments passed to a custom function
235
- never contain ''var()'' , or similar functions.
235
+ Note: This means arguments passed to a custom function
236
+ never contain ''var()'' , or similar functions.
236
237
237
238
A ''var()'' function within a [=local variable=] ,
238
239
or within the ''@function/result'' descriptor,
0 commit comments