[css-shapes-1] Implement rect() function
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox117 | --- | fixed |
People
(Reporter: sebo, Assigned: boris)
References
(Blocks 3 open bugs, )
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
The CSS Shapes 1 specification defines a rect()
function to create a rectangular shape as insets from the reference box similar to the inset()
function.
This bug is meant to implement that function.
Sebastian
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•10 months ago
|
||
Note that rect() computes to the equivalent inset() function as well.
i.e. Given rect(t r b l)
, the equivalent function is
inset(t calc(100% - r) calc(100% - b) l)
.
The implementation is straightforward, and we don't have to change
anything in cpp because it is always inset()
when building the gfx::Path.
The tests for clip-path will be added in the following patch.
Assignee | ||
Comment 2•10 months ago
|
||
Also, move the interpolation of xywh() into
clip-path-interpolation-xywh-rect.html.
Pushed by bchiou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/014ccd272ac6 Support rect() function. r=devtools-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/fbce1db481ca Add rect() tests for clip-path. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41169 for changes under testing/web-platform/tests
Comment 5•9 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/014ccd272ac6
https://hg.mozilla.org/mozilla-central/rev/fbce1db481ca
Upstream PR merged by moz-wptsync-bot
Comment 7•9 months ago
|
||
bugherder |
MDN doc updates for this feature can be tracked via this issue: https://github.com/mdn/content/issues/28287 (in review).
Thanks Boris for all your help!
Description
•