You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The return type of the custom function, represented as a syntax string. If the custom function has no return type, returns "type(*)".
CSSFunctionRule.returnsType may be internally represented as a <type()> (the result from parsing returns <css-type>) unless otherwise specified, and thus would not represent a valid syntax string.
So I would first suggest:
The return type of the custom function:
if it is a <syntax-component>, represented as a syntax string
if it is a <type()>, represented as its value as a syntax string
if it is not defined, as *.
Now I do not see why it should be represented as a syntax string rather than the serialization of <css-type>. Is it intentional? Plugging it in @property/syntax (the only value defined with a syntax <string>) does not seem useful. I would have thought that representing a syntax as a <string> would become legacy.
The universal syntax definitions is (implicitly) defined as the value *, which is not a valid function parameter type value.
This intent is unambiguous, of course, but this and the other points above make me wonder if the spec expects implementations to store syntaxes unwrapped from type().
If the function parameter has a default value:
A single COLON (U+003A), followed by a single SPACE (U+0020), followed by the result of performing serialize a CSS value on that value.
Serialize a CSS value is intended for declarations whereas <function-parameter>may look like a declaration but its value is optional and it may also have a type. Should it be serialize a CSS component value instead?
The text was updated successfully, but these errors were encountered:
They are minors so I hope it is okay if I do not create separate issues.
CSSFunctionRule.name
:Shouldn'it be serialized as an identifier?
--cust\\ om()
becomes<function-token>
whose value iscust om
, and<)-token>
. Then these tokens become a function whosename
iscust om
.The same question applies to
FunctionParameter.name
.CSSFunctionRule.returnType
:CSSFunctionRule.returnsType
may be internally represented as a<type()>
(the result from parsingreturns <css-type>
) unless otherwise specified, and thus would not represent a valid syntax string.So I would first suggest:
Now I do not see why it should be represented as a syntax string rather than the serialization of
<css-type>
. Is it intentional? Plugging it in@property/syntax
(the only value defined with a syntax<string>
) does not seem useful. I would have thought that representing a syntax as a<string>
would become legacy.The same problem/question applies to
FunctionParameter.type
.Serialize a function parameter:
The universal syntax definitions is (implicitly) defined as the value
*
, which is not a valid function parameter type value.This intent is unambiguous, of course, but this and the other points above make me wonder if the spec expects implementations to store syntaxes unwrapped from
type()
.Serialize a CSS value is intended for declarations whereas
<function-parameter>
may look like a declaration but its value is optional and it may also have a type. Should it be serialize a CSS component value instead?The text was updated successfully, but these errors were encountered: