@@ -67,49 +67,49 @@ Registering custom properties {#registering-custom-properties}
67
67
==============================================================
68
68
69
69
<pre class='idl'>
70
- dictionary PropertyDescriptor {
70
+ dictionary PropertyDefinition {
71
71
required DOMString name;
72
72
DOMString syntax = "*";
73
73
required boolean inherits;
74
74
DOMString initialValue;
75
75
};
76
76
77
77
partial namespace CSS {
78
- void registerProperty(PropertyDescriptor descriptor );
78
+ void registerProperty(PropertyDefinition definition );
79
79
};
80
80
</pre>
81
81
82
82
Additional, the {{Document}} object gains a new <dfn attribute for=Window>\[[registeredPropertySet]]</dfn> private slot,
83
83
which is a set of records that describe registered custom properties.
84
84
85
- The {{PropertyDescriptor }} dictionary {#the-propertydescriptor -dictionary}
85
+ The {{PropertyDefinition }} dictionary {#the-propertydefinition -dictionary}
86
86
--------------------------------------------------------------------------
87
87
88
- A <dfn dictionary>PropertyDescriptor </dfn> dictionary represents author-specified configuration
89
- options for a custom property. {{PropertyDescriptor }} dictionaries contain the
88
+ A <dfn dictionary>PropertyDefinition </dfn> dictionary represents author-specified configuration
89
+ options for a custom property. {{PropertyDefinition }} dictionaries contain the
90
90
following members:
91
91
92
- : <dfn dict-member for=PropertyDescriptor >name</dfn>
92
+ : <dfn dict-member for=PropertyDefinition >name</dfn>
93
93
:: The name of the custom property being defined.
94
94
95
- : <dfn dict-member for=PropertyDescriptor >syntax</dfn>
95
+ : <dfn dict-member for=PropertyDefinition >syntax</dfn>
96
96
:: A string representing how this custom property is parsed.
97
97
98
- : <dfn dict-member for=PropertyDescriptor >inherits</dfn>
98
+ : <dfn dict-member for=PropertyDefinition >inherits</dfn>
99
99
:: True if this custom property should inherit down the DOM tree; False otherwise.
100
100
101
- : <dfn dict-member for=PropertyDescriptor >initialValue</dfn>
101
+ : <dfn dict-member for=PropertyDefinition >initialValue</dfn>
102
102
:: The initial value of this custom property.
103
103
104
104
The {{registerProperty()}} function {#the-registerproperty-function}
105
105
--------------------------------------------------------------------
106
106
107
- The <dfn method for=CSS>registerProperty(PropertyDescriptor descriptor )</dfn> method
107
+ The <dfn method for=CSS>registerProperty(PropertyDefinition definition )</dfn> method
108
108
registers a custom property according to the configuration options provided in
109
- <code> descriptor </code> .
109
+ <code> definition </code> .
110
110
When it is called,
111
111
it executes the <a>register a custom property</a> algorithm,
112
- passing the options in its <code> descriptor </code> argument
112
+ passing the options in its <code> definition </code> argument
113
113
as arguments of the same names.
114
114
115
115
<div algorithm>
@@ -142,19 +142,19 @@ as arguments of the same names.
142
142
<a>throw</a> an {{InvalidModificationError}}
143
143
and exit this algorithm.
144
144
145
- 3. Attempt to [=consume a syntax descriptor =] from |syntax|.
145
+ 3. Attempt to [=consume a syntax definition =] from |syntax|.
146
146
If it returns failure, <a>throw</a> a {{SyntaxError}} .
147
- Otherwise, let |syntax descriptor | be the returned <a>syntax descriptor </a> .
147
+ Otherwise, let |syntax definition | be the returned <a>syntax definition </a> .
148
148
149
- 4. If |syntax descriptor | is the <a>universal syntax descriptor </a> ,
149
+ 4. If |syntax definition | is the <a>universal syntax definition </a> ,
150
150
and |initialValue| is not present,
151
151
let |parsed initial value| be empty.
152
152
This must be treated identically to the "default" initial value of custom properties,
153
153
as defined in [[!css-variables]] .
154
154
Skip to the next step of this algorithm.
155
155
156
156
Otherwise,
157
- if |syntax descriptor | is the <a>universal syntax descriptor </a> ,
157
+ if |syntax definition | is the <a>universal syntax definition </a> ,
158
158
[=CSS/parse=] |initialValue| as a <<declaration-value>> .
159
159
If this fails,
160
160
<a>throw</a> a {{SyntaxError}}
@@ -168,8 +168,8 @@ as arguments of the same names.
168
168
and exit this algorithm.
169
169
170
170
Otherwise,
171
- [=CSS/parse=] {{PropertyDescriptor /initialValue}}
172
- according to |syntax descriptor |.
171
+ [=CSS/parse=] {{PropertyDefinition /initialValue}}
172
+ according to |syntax definition |.
173
173
If this fails,
174
174
<a>throw</a> a {{SyntaxError}}
175
175
and exit this algorithm.
@@ -183,7 +183,7 @@ as arguments of the same names.
183
183
184
184
6. Let |registered property| be a [=struct=]
185
185
with a property name of |parsed name|,
186
- a syntax of |syntax descriptor |,
186
+ a syntax of |syntax definition |,
187
187
an initial value of |parsed initial value|,
188
188
and an inherit flag of |inherit flag|.
189
189
[=set/Append=] |registered property|
@@ -404,11 +404,11 @@ custom property. Syntax strings consists of
404
404
[=syntax component names=] , that are
405
405
optionally [[#multipliers|multiplied]] and [[#combinator|combined]] .
406
406
407
- A syntax string can be parsed into a <a>syntax descriptor </a> , which is either:
407
+ A syntax string can be parsed into a <a>syntax definition </a> , which is either:
408
408
409
409
1. A list of <a>syntax components</a> , each of which accept the value types
410
410
specified in [[#supported-names]] , or
411
- 2. The <a>universal syntax descriptor </a> ('*' ), which accepts any valid token
411
+ 2. The <a>universal syntax definition </a> ('*' ), which accepts any valid token
412
412
stream.
413
413
414
414
Note: Regardless of the syntax specified, all custom properties accept
@@ -498,7 +498,7 @@ corresponding types accepted by the resulting <a>syntax component</a>.
498
498
equivalent to <code> "<transform-function>+"</code>
499
499
500
500
Note: A syntax string of <code> "*"</code> will produce the
501
- <a>universal syntax descriptor </a> , which is not a <a>syntax component</a> .
501
+ <a>universal syntax definition </a> , which is not a <a>syntax component</a> .
502
502
Therefore, <code> "*"</code> may not be [[#multipliers|multiplied]] or
503
503
[[#combinator|combined]] with anything else.
504
504
@@ -529,9 +529,9 @@ The '|' combinator {#combinator}
529
529
530
530
<a>Syntax strings</a> may use U+007C VERTICAL LINE (|) to provide multiple
531
531
<a>syntax component names</a> . Such syntax strings will result in a
532
- <a>syntax descriptor </a> with multiple <a>syntax components</a> .
532
+ <a>syntax definition </a> with multiple <a>syntax components</a> .
533
533
534
- When a <a>syntax descriptor </a> with multiple <a>syntax components</a> is used
534
+ When a <a>syntax definition </a> with multiple <a>syntax components</a> is used
535
535
to parse a CSS value, the syntax components are matched in the order specified.
536
536
537
537
Note: That is, given the syntax string <code> "red | <color>"</code> ,
@@ -563,18 +563,18 @@ Parsing the syntax string {#parsing-syntax}
563
563
:: A sequence of <a>code points</a> which is either a <a>data type name</a> ,
564
564
or a sequence that can produce a <<custom-ident>> .
565
565
566
- : <dfn>syntax descriptor </dfn>
566
+ : <dfn>syntax definition </dfn>
567
567
:: An object consisting of a list of <a>syntax components</a> .
568
568
569
- : <dfn>universal syntax descriptor </dfn>
570
- :: A special descriptor which accepts any valid token stream.
569
+ : <dfn>universal syntax definition </dfn>
570
+ :: A special syntax definition which accepts any valid token stream.
571
571
572
- ### Consume a syntax descriptor ### {#consume-syntax-descriptor }
572
+ ### Consume a syntax definition ### {#consume-syntax-definition }
573
573
574
574
<div algorithm>
575
- This section describes how to <dfn export>consume a syntax descriptor </dfn> from a [=string=] |string|.
576
- It either produces a <a>syntax descriptor </a>
577
- with a list of <a>syntax components</a> , or the <a>universal syntax descriptor </a> .
575
+ This section describes how to <dfn export>consume a syntax definition </dfn> from a [=string=] |string|.
576
+ It either produces a <a>syntax definition </a>
577
+ with a list of <a>syntax components</a> , or the <a>universal syntax definition </a> .
578
578
579
579
1. [=Strip leading and trailing ASCII whitespace=] from |string|.
580
580
@@ -583,23 +583,23 @@ Parsing the syntax string {#parsing-syntax}
583
583
584
584
3. If |string|’s [=string/length=] is 1,
585
585
and the only [=code point=] in |string| is U+002A ASTERISK (*),
586
- return the [=universal syntax descriptor =] .
586
+ return the [=universal syntax definition =] .
587
587
588
588
4. Let |stream| be an [=input stream=] created from the [=code points=] of |string|,
589
589
preprocessed as specified in [[css-syntax-3]] .
590
- Let |descriptor | be an initially empty [=list=] of <a>syntax components</a> .
590
+ Let |definition | be an initially empty [=list=] of <a>syntax components</a> .
591
591
592
592
5. <a>Consume a syntax component</a> from |stream|.
593
593
If failure was returned,
594
594
return failure;
595
595
otherwise,
596
- [=list/append=] the returned value to |descriptor |.
596
+ [=list/append=] the returned value to |definition |.
597
597
598
598
Consume as much <a>whitespace</a> as possible from |stream|.
599
599
600
600
Consume the <a>next input code point</a> in |stream|:
601
601
: EOF
602
- :: return |descriptor |.
602
+ :: return |definition |.
603
603
604
604
: U+007C VERTICAL LINE (|)
605
605
:: Repeat step 5.
@@ -765,7 +765,7 @@ Fallbacks in ''var()'' references {#fallbacks-in-var-references}
765
765
766
766
References to registered custom properties using the ''var()'' function may
767
767
provide a fallback. However, the fallback value must match the
768
- <a>syntax descriptor </a> of the custom property being referenced, otherwise the
768
+ <a>syntax definition </a> of the custom property being referenced, otherwise the
769
769
declaration is <a spec=css-variables>invalid at computed-value time</a> .
770
770
771
771
Note: This applies regardless of whether or not the fallback is being used.
@@ -822,7 +822,7 @@ CSSOM {#cssom}
822
822
823
823
<div algorithm>
824
824
To <dfn>reify a registered custom property value</dfn> given a property
825
- |property| and [=syntax descriptor =] |syntax|, run these steps:
825
+ |property| and [=syntax definition =] |syntax|, run these steps:
826
826
827
827
For specified values, [=reify a list of component values=] from the value,
828
828
and return the result.
@@ -841,7 +841,7 @@ CSSOM {#cssom}
841
841
return the result.
842
842
5. If the value is an [=identifier=] , [=reify an identifier=] from the value
843
843
and return the result.
844
- 6. If |syntax| is the [=universal syntax descriptor =] ,
844
+ 6. If |syntax| is the [=universal syntax definition =] ,
845
845
[=reify a list of component values=] from the value, and return the
846
846
result.
847
847
7. Otherwise, [=reify as a CSSStyleValue=] with the
0 commit comments