[csswg-drafts] [css-masking-1] Fix value definition of deprecated `clip` property (#7219)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-masking-1] Fix value definition of deprecated `clip` property ==
`clip` is defined in [Masking 1](https://drafts.fxtf.org/css-masking-1/#propdef-clip) with `rect() | auto`. `rect()` is anchored to its definition below the `clip` property definition table: `rect() = rect( <top>, <right>, <bottom>, <left> )`. Lastly, `clip` is deprecated, it is the only property that uses `<rect()>` with this definition, and there is a new definition of `<rect()>` in [Shapes 1](https://drafts.csswg.org/css-shapes-1/#funcdef-basic-shape-rect):

> `rect() = rect( [ <length-percentage> | auto ]{4} [ round <'border-radius'> ]? )`
>
> Note: This syntax is similar, but not quite identical, to the legacy rect() function used solely by the clip property.

I believe that `rect()` in the `clip` property is ambiguous because it can be interpreted as a function component value named `rect` with no argument. A terminal or non-terminal must be defined between angled brackets, per the [CSS value definition syntax](https://drafts.csswg.org/css-values-4/#component-types). 

To avoid [declaring different value definitions for the same type](https://github.com/w3c/webref/issues/127#issuecomment-1094811809), `clip` could be defined as `rect( [ <length-percentage> | auto ]{4} [ round <'border-radius'> ]? ) | auto` and the definition  of `<rect()>` below the `clip` definition table could be removed or rewrited in a way that prevent `@webref/css` to extract it.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7219 using your GitHub account


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

Received on Friday, 15 April 2022 03:04:52 UTC