Re: [csswg-drafts] [css-transforms-2] Potentially invalid syntax for `perspective()` (#7582)

> It doesn't have any special rules for functions (or anything else) to automatically create groups in the grammar.

What are the cases (other than function arguments) where a group should be created automatically? Do these rules also explain why a group is created for the types specific to `font-variant-alternates` in the value definition of [`font-variant`](https://drafts.csswg.org/css-fonts-4/#font-variant-prop)?

I guess the reason for creating a group that is not strictly required, is to make a grammar parser produce a nested list with the corresponding value(s). From this perspective, it would have been nice to create groups for the types specific to `font-variant-ligatures`, `font-variant-numeric`, and `font-variant-east-asian`. It would make shorthand expansion easier, imo.

I'm sorry for this noise on a closed issue. Please tell me if I should create a new issue.

Related: #2921 

```
  normal 
| none 
| [
       # font-variant-ligatures
       <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> 
       # font-variant-caps
    || [small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps] 
    || [
            stylistic(<feature-value-name>) 
         || historical-forms 
         || styleset(<feature-value-name>#) 
         || character-variant (<feature-value-name>#) 
         || swash(<feature-value-name>) 
         || ornaments(<feature-value-name>) 
         || annotation(<feature-value-name>)
       ] 
       # font-variant-numeric
    || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero 
       # font-variant-east-asian
    || <east-asian-variant-values> || <east-asian-width-values> || ruby 
       # font-variant-position
    || [sub | super] 
       # font-variant-emoji
    || [text | emoji | unicode] 
 ]
```

-- 
GitHub Notification of comment by cdoublev
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7582#issuecomment-1231109966 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 30 August 2022 03:55:31 UTC