diff --git a/css-properties-values-api/Overview.bs b/css-properties-values-api/Overview.bs index 67cdd395..8459616e 100644 --- a/css-properties-values-api/Overview.bs +++ b/css-properties-values-api/Overview.bs @@ -140,25 +140,11 @@ as arguments of the same names. throw an {{InvalidModificationError}} and exit this algorithm. - 3. If |syntax| is not present, - or is equal to "*" (U+002A ASTERISK), - let |parsed syntax| be undefined, - and skip to the next step of this algorithm. - - Otherwise, attempt to parse |syntax| - according to the rules in [[#supported-syntax-strings]]. - If it does not parse successfully, - throw a {{SyntaxError}}. - Otherwise, - let |parsed syntax| be the parsed syntax. - - Note: For example, a valid syntax string is something like "<length>", - or "<number>+"; - the allowed syntax is a subset of [[css-values-3#value-defs]]. - Future levels of this specification are expected to expand the complexity of allowed syntax strings, - allowing custom properties that more closely resemble the full breadth of what CSS properties allow. + 3. Attempt to [=consume a syntax descriptor=] from |syntax|. + If it returns failure, throw a {{SyntaxError}}. + Otherwise, let |syntax descriptor| be the returned syntax descriptor. - 4. If |parsed syntax| is undefined, + 4. If |syntax descriptor| is the universal syntax descriptor, and |initialValue| is not present, let |parsed initial value| be empty. This must be treated identically to the "default" initial value of custom properties, @@ -166,8 +152,8 @@ as arguments of the same names. Skip to the next step of this algorithm. Otherwise, - if |parsed syntax| is undefined, - parse |initialValue| as a <>. + if |syntax descriptor| is the universal syntax descriptor, + [=CSS/parse=] |initialValue| as a <>. If this fails, throw a {{SyntaxError}} and exit this algorithm. @@ -180,8 +166,8 @@ as arguments of the same names. and exit this algorithm. Otherwise, - parse {{PropertyDescriptor/initialValue}} - according to |parsed syntax|. + [=CSS/parse=] {{PropertyDescriptor/initialValue}} + according to |syntax descriptor|. If this fails, throw a {{SyntaxError}} and exit this algorithm. @@ -193,12 +179,12 @@ as arguments of the same names. 5. Set |inherit flag| to the value of |inherits|. - 6. Let |registered property| be a record + 6. Let |registered property| be a [=struct=] with a property name of |parsed name|, - a syntax of |parsed syntax|, + a syntax of |syntax descriptor|, an initial value of |parsed initial value|, and an inherit flag of |inherit flag|. - Add |registered property| + [=set/Append=] |registered property| to |property set|. @@ -281,111 +267,6 @@ the property becomes [=invalid at computed-value time=] and becoming ''inherit''. -Supported syntax strings {#supported-syntax-strings} ----------------------------------------------------- - -The following syntax strings are supported: - -: Primitive Terms -:: The following syntax strings are primitive terms that can be - combined as described below: - - : "<length>" - :: Any valid <> value - : "<number>" - :: <> values - : "<percentage>" - :: Any valid <> value - : "<length-percentage>" - :: Any valid <> or <> value, any valid <> - expression combining <> and <> components. - : "<color>" - :: Any valid <> value - : "<image>" - :: Any valid <> value - : "<url>" - :: Any valid <> value - : "<integer>" - :: Any valid <> value - : "<angle>" - :: Any valid <> value - : "<time>" - :: Any valid <