Re: [csswg-drafts] [css-contain-3] container :/ size (#7142)

If you only want to set a type, the syntax currently allows you to skip the name completely but requires the slash. E.g. you'd have to write `/size`. `:/size` means the colon is interpreted as the container name and `size` as the container type. `:/` _alone_ is invalid as of the current syntax because if the value contains a slash, it requires to define a container type.

My point is that the current syntax definition is invalid because it allows empty values. The correct syntax definition for allowing both values to be optional would be `<'container-name'> [ / <'container-type'> ]? | <'container-type'>`. And _that_ syntax would require to define to exclude container types from names in order to allow specifying _only_ a container type. Otherwise a value like `size` or `style` would then be ambiguous.

Anyway, I think we all want the same, drop the question mark from the `<'container-name'>`, i.e. require a container name in the shorthand. This resolves the issue about empty values being valid and pushes the usage of container names.

Sebastian

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


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

Received on Wednesday, 6 April 2022 08:45:51 UTC