Intent to un-ship: :-moz-loading / :-moz-broken pseudo-classes

61 views
Skip to first unread message

Emilio Cobos Álvarez

unread,
Aug 28, 2023, 8:56:12 AM8/28/23
to dev-pl...@mozilla.org
Gecko implements two proprietary pseudo-classes on images and sometimes
<embed> / <object>. These are documented here:

* https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-loading
* https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-broken

While these seem somewhat useful in some cases[1], they were added for
internal use and have various issues (in particular :-moz-loading is
totally under-tested, and :-moz-broken no longer really reflects whether
we create a replaced element for an image or not).

So over-all I think it's better to remove. Once there's a standard
proposal for something like this, we should implement that.

I've done some looking-up into how risky this is to remove and it
doesn't seem particularly risky. All usages of :-moz-loading I've seen
were used to hide loading images, mostly due to some icon we used to
display long ago (we no longer do).

For :-moz-broken, I plan to leave a pref for now
(layout.css.moz-broken.content.enabled), if only because we have one
internal usage.

Let me know if this looks concerning. We've removed similar
pseudo-classes in the past like :-moz-suppressed without issues.

This will happen in bug 1850342, if there are no objections.

Cheers,

-- Emilio

[1]: https://github.com/whatwg/html/issues/3631

Sebastian Zartner

unread,
Aug 28, 2023, 2:49:37 PM8/28/23
to dev-pl...@mozilla.org, emi...@mozilla.com
On Monday, August 28, 2023 at 2:56:12 PM UTC+2 emi...@mozilla.com wrote:
Once there's a standard proposal for something like this, we should implement that.

For what it's worth, there are already standard proposals for them:

Sebastian
Reply all
Reply to author
Forward
0 new messages