Intent to unship: -moz-image-rect()

70 views
Skip to first unread message

Emilio Cobos Álvarez

unread,
Sep 19, 2023, 4:35:01 AM9/19/23
to Mozilla
In Firefox 120 (so at the beginning of next cycle) I plan to remove a
Firefox-only CSS feature that we have no use for anymore in bug 1853867.

-moz-image-rect is a convenient-ish way of doing sprite images, but
other browsers don't have anything similar and the use case is well
covered by background-size + background-position.

Given that, I don't expect the removal to be particularly risky, but I'm
happy to put it behind a pref first or what not if people think otherwise.

-- Emilio

Jason Kuhn

unread,
Sep 19, 2023, 9:22:49 AM9/19/23
to dev-pl...@mozilla.org, emi...@crisal.io
Agree with the removal of -moz-image-rect but disagree that this functionality is "well covered" by the background-image/size/position combo. Using 3 properties for spriting has always felt very hacky. Importantly it greatly reduces the devs ability to easily position and size background sprited images because those properties are being sacrificed to the "spriting syntax".

The CSSWG spec-ed image fragmenting as part of `image()` a long time ago (I want to say 10 years, it was originally part of images-3 i believe?).

https://developer.mozilla.org/en-US/docs/Web/CSS/image/image#image_fragments

This would bring background spriting more inline with the `object-view-box` spriting syntax for the IMG tag that Chrome recently added.

Brian Grinstead

unread,
Sep 20, 2023, 4:48:03 PM9/20/23
to Emilio Cobos Álvarez, Mozilla
I think it can be unshipped directly during next cycle - I see almost no usage of this value on HTTP Archive.

Brian
> --
> You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
> To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/e1085d09-a342-459c-9054-c2087fd06763%40crisal.io.

Reply all
Reply to author
Forward
0 new messages