-
Notifications
You must be signed in to change notification settings - Fork 759
Open
Description
Would it be possible to add contextual productions for the value definitions of the prelude of @function, @mixin, @env, @custom-media, @custom-selector?
For example:
- <@function> = @function <function-token> <function-parameter>#? )
- [ returns <css-type> ]?
- {
- <declaration-rule-list>
- }
+ <@function> = @function <custom-function-definition> { <declaration-rule-list > }
+ <custom-function-definition> = <function-token> <function-parameter>#? ) [ returns <css-type> ]?The main reason is simply convenience in implementing declarative grammar validation (eg. an invalid @function parameter type).
I think this can also help to clarify them and to understand the terminology defined in prose.
Similarly, would it be possible to add a production for the value definition of a custom selector name?
- <custom-selector> = <custom-arg>? : <extension-name> [ ( <custom-arg>+#? ) ]?
+ <custom-selector> = <custom-arg>? <custom-selector-name> [ ( <custom-arg>+#? ) ]?
+ <custom-selector-name> = : <extension-name>Happy to submit these changes is that sounds good to the editors of the related specs.