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

Open
#7,219 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
38/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
css
Domain
documentation

Research direction

Start with the Masking 1 definition of the deprecated clip property and compare its rect() syntax with the Shapes 1 definition linked in the issue. Check how the definitions are extracted by @webref/css. Done means the clip value is unambiguous and no conflicting rect() definition remains for extraction.

Written by the indexing model from the issue text.

Description

Closed Accepted as Obvious Bugfix fx-masking-1 Needs Edits

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.

Dominant language
Bikeshed
Stars
4.9k
Forks
816
Avg merge
2d 18h
Merged PRs (30d)
24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/csswg-drafts

All issues in w3c/csswg-drafts

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.