Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-masking-1] Fix value definition of deprecated clip property #7219

Open
cdoublev opened this issue Apr 15, 2022 · 1 comment
Open

[css-masking-1] Fix value definition of deprecated clip property #7219

cdoublev opened this issue Apr 15, 2022 · 1 comment

Comments

@cdoublev
Copy link
Collaborator

cdoublev commented Apr 15, 2022

clip is defined in Masking 1 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:

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.

To avoid declaring different value definitions for the same type, clip could be defined as rect( <top>, <right>, <bottom>, <left> ) | 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.

@tabatkins
Copy link
Member

Correct, the 'clip' grammar is wrong and needs to be replaced with a nonterminal (presumably a specialized one for this property specifically).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants