Skip to content

Commit 71d777b

Browse files
committed
[css-mixins] Tweak the definitions a little to be friendlier cross-spec.
1 parent 3db9601 commit 71d777b

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

css-mixins-1/Overview.bs

+18-17
Original file line numberDiff line numberDiff line change
@@ -101,27 +101,28 @@ The ''@function'' rule defines a [=custom function=],
101101
and its syntax is:
102102

103103
<pre class="prod def" nohighlight>
104-
@function <<function-name>> [ ( <<parameter-list>> ) ]?
105-
[ using ( <<dependency-list>> ) ]?
106-
[ returns <<type>> ]?
104+
&lt;@function> = @function <<function-name>> [ ( <<function-parameter-list>> ) ]?
105+
[ using ( <<function-dependency-list>> ) ]?
106+
[ returns <<css-type>> ]?
107107
{
108108
<<declaration-rule-list>>
109109
}
110110
111111
<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>&lt;type()></dfn> = type( <<syntax>> )
116117
</pre>
117118

118119
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.
122123

123124
<div class='example'>
124-
If the <<type>> of a [=function parameter=],
125+
If the <<css-type>> of a [=function parameter=],
125126
[=function dependency=],
126127
or [=custom function=] return value
127128
can be described by a single <<syntax-component>>,
@@ -151,9 +152,9 @@ and rules defined later win within the same layer.
151152

152153
The <<function-name>> of a ''@function'' rule is a [=tree-scoped name=].
153154

154-
If the <<parameter-list>>
155+
If the <<function-parameter-list>>
155156
contains the same <<custom-property-name>> more than once,
156-
or if the <<dependency-list>>
157+
or if the <<function-dependency-list>>
157158
contains the same <<custom-property-name>> more than once,
158159
then the ''@function'' rule is invalid.
159160

@@ -213,8 +214,8 @@ A <dfn><<dashed-function>></dfn> is a [=functional notation=]
213214
whose function name starts with two dashes (U+002D HYPHEN-MINUS).
214215
Its syntax is:
215216

216-
<pre class="prod def" nohighlight>
217-
--*() = --*( <<declaration-value>># )
217+
<pre class="prod informative" nohighlight>
218+
--*( <<declaration-value>># )
218219
</pre>
219220

220221
Issue: Mention semicolon upgrades.
@@ -231,8 +232,8 @@ When a value is being computed,
231232
substitution of ''var()'', ''env()'' and ''attr()''
232233
must take place <em>before</em> <<dashed-function>> substitution.
233234

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.
236237

237238
A ''var()'' function within a [=local variable=],
238239
or within the ''@function/result'' descriptor,

0 commit comments

Comments
 (0)