Intent to prototype and ship: support rect() and xywh() ing basic-shape

96 views
Skip to first unread message

Boris Chiou

unread,
Dec 7, 2023, 12:49:47 AM12/7/23
to dev-pl...@mozilla.org

I noticed I forgot to send the intent-to-prototype mail, so merge these two mails together. These features have been implemented for a couple of months and enabled on Nightly.

Summary: rect() and xywh() are two similar basic shapes like inset(). But the difference is:

  1. rect(): its four `<length-percentage>`s define the position of the top, right, bottom, and left edges of a rectangle (i.e. reference box).
  2. xywh(): Defines a rectangle via offsets from the top and left edge of the reference box, and a specified width and height.

Bug:
rect(): https://bugzilla.mozilla.org/show_bug.cgi?id=1786161,
xywh(): https://bugzilla.mozilla.org/show_bug.cgi?id=1786160
Bug to turn on by default: https://bugzilla.mozilla.org/show_bug.cgi?id=1868722
Specification: https://drafts.csswg.org/css-shapes/#funcdef-basic-shape-rect and https://drafts.csswg.org/css-shapes/#funcdef-basic-shape-xywh
Platform coverage: All.
Preference: layout.css.basic-shape-rect.enabled and layout.css.basic-shape-xywh.enabled
DevTools bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1841237 and https://bugzilla.mozilla.org/show_bug.cgi?id=1841235
Link to standards-positions discussion: no discussion there. These two basic-shapes are very simple and they have been in the spec for a long time already. These two shapes are in our interop2023 metrics, so I assume we are positive for this.

Other browsers:

  • Blink: Shipped this year
  • WebKit: Not shipped yet but implemented this year

web-platform-tests: motion and css-masking use these two shapes:

  1. css/motion/offset-path-shape-rect-[001-003].html
  2. css/motion/offset-path-shape-xywh-[001-003].html
  3. css/css-masking/clip-path/clip-path-rect-[001-003].html
  4. css/css-masking/clip-path/clip-path-xywh-[001-003].html
  5. and the paring tests in the above folder

As of fx122, I intend to turn these two shapes on by default on all platforms. It has been developed behind the layout.css.basic-shape-rect.enabled and layout.css.basic-shape-xywh.enabled preference. Status in other browsers is shown above

Regards,
Boris

Reply all
Reply to author
Forward
0 new messages