Skip to content

Commit 599a58f

Browse files
committed
[css-mixins-1] Allow a mixin to be invoked without an arg list.
1 parent 91e074d commit 599a58f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

css-mixins-1/Overview.bs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ in place of the ''@apply'' rule itself.
11331133
Its grammar is:
11341134

11351135
<pre class="prod">
1136-
<<@apply>> = @apply <<dashed-function>> [ { <<declaration-list>> } ]?;
1136+
<<@apply>> = @apply [ <<dashed-ident>> | <<dashed-function>> ] [ { <<declaration-list>> } ]?;
11371137
</pre>
11381138

11391139
The ''@apply'' rule is only valid
@@ -1148,16 +1148,19 @@ adjust which properties and rules are active in a stylesheet
11481148
before styles are applied.)
11491149

11501150
The ''@apply'' rule applies the [=mixin=]
1151-
named by the <<dashed-function>>'s name.
1151+
named by the <<dashed-ident>> or the <<dashed-function>>'s name.
11521152
If no such [=mixin=] exists,
11531153
the ''@apply'' does nothing.
11541154

1155-
The arguments passed to the <<dashed-function>>
1155+
If passed a <<dashed-function>>,
1156+
the arguments passed to the <<dashed-function>>
11561157
are mapped to the [=mixin's=] arguments;
11571158
if more arguments are passed than the length of the [=mixin's=] argument list,
11581159
the ''@apply'' application does nothing.
11591160
(Passing too few arguments is fine;
11601161
the missing arguments take their default values instead.)
1162+
A <<dashed-ident>> passes no arguments.
1163+
(That is, ''@apply --foo;'' is identical to ''@apply --foo();''.)
11611164

11621165
If the [=mixin=] declares a ''@contents'' parameter,
11631166
and the ''@apply'' rule has a <<declaration-list>> block,

0 commit comments

Comments
 (0)