Skip to content

Commit 4bcd56b

Browse files
committed
[css-properties-values-api] Multi-name @property grammar + CSSOM issue link
CSSWG resolution: w3c/csswg-drafts#7523 (comment)
1 parent d286153 commit 4bcd56b

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

css-properties-values-api/Overview.bs

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -553,14 +553,28 @@ as if {{registerProperty()}} had been called with equivalent parameters.
553553
The syntax of ''@property'' is:
554554

555555
<pre class="prod def" nohighlight>
556-
@property <<custom-property-name>> {
556+
@property <<custom-property-name>># {
557557
<<declaration-list>>
558558
}
559559
</pre>
560560

561-
A valid ''@property'' rule represents a [=custom property registration=],
562-
with the property name being the serialization of the <<custom-property-name>>
563-
in the rule's prelude.
561+
A valid ''@property'' rule represents a [=custom property registration=]
562+
for each <<custom-property-name>> in the rule's prelude,
563+
with the property name being the serialization of that <<custom-property-name>>
564+
and all other fields identical.
565+
566+
<div class='example'>
567+
The following rule registers three properties
568+
with the same syntax, inheritance behavior, and initial value:
569+
570+
<pre class='lang-css'>
571+
@property --width, --height, --depth {
572+
syntax: "&lt;length>";
573+
inherits: false;
574+
initial-value: 0px;
575+
}
576+
</pre>
577+
</div>
564578

565579
''@property'' rules require a '@property/syntax' and '@property/inherits' descriptor;
566580
if either are missing,
@@ -574,7 +588,8 @@ Unknown descriptors are invalid and ignored,
574588
but do not invalidate the ''@property'' rule.
575589

576590
Note: As specified in [[#determining-registration]],
577-
if multiple valid ''@property'' rules are defined for the same <<custom-property-name>>,
591+
if multiple valid ''@property'' rules represent a registration
592+
for the same <<custom-property-name>>,
578593
the last one in stylesheet order "wins".
579594
A custom property registration from {{registerProperty()|CSS.registerProperty()}}
580595
further wins over any ''@property'' rules
@@ -1187,6 +1202,10 @@ The <dfn interface>CSSPropertyRule</dfn> Interface {#the-css-property-rule-inter
11871202

11881203
The {{CSSPropertyRule}} interface represents an ''@property'' rule.
11891204

1205+
Issue(w3c/csswg-drafts#14227):
1206+
The CSSOM for multi-name ''@property'' rules
1207+
has not been resolved on by the CSSWG.
1208+
11901209
<pre class='idl' export>
11911210
[Exposed=Window]
11921211
interface CSSPropertyRule : CSSRule {

0 commit comments

Comments
 (0)