Re: [csswg-drafts] [css-contain] container shorthand syntax is confusing. (#7180)

And _if_ both parts of the syntax should be optional, the syntax is still incorrect.

If all parts of a group are optional but need to produce at least one value, you need to add an [exclamation mark](https://drafts.csswg.org/css-values-4/#component-multipliers), but in this case we have the slash before the second value. That would make values like `/ style` valid.

So it should be:

```
<'container-name'> [ / <'container-type'> ]? | <'container-type'>
```

Having said that, this syntax would be ambiguous as names could clash with the types. So again, _if_ container names are also be meant to be optional, the prose needs to clarify that the keywords defined for `container-type` are invalid as container names.

Sebastian

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


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

Received on Wednesday, 30 March 2022 07:05:22 UTC