Unknown @ rule: @-moz-document for Stylish in Firefox 61

Mozilla nuked @-moz-document rules with Firefox version 61. It's supposed to be replaced with @document(link), but that doesn't work yet.

This needs to be addressed in Stylish. It would be best if the Import tool parses @-moz-document rules to its internal metadata and then strips the text on import, IMO.

I couldn't find anything about this new Firefox breakage in a quick search of the Stylish GitHub, so you may want to raise the issue over there.

As a temporary workaround, you can set the layout.css.moz-document.content.enabled pref to true in about:config.
That won't clear the red error X in the edit dialog, but the script will work.


@BrockAdams is correct about the change, but @-moz-document should still work in userstyles.
The preference he mentions enables it generally, which Mozilla has disabled for security reasons.
This about: URL takes you to the preference directly: about:config?filter=layout.css.moz-document.content.enabled

From @document:

  • Implemented with the vendor prefix: -moz-
  • Disabled by default in web pages, except for an empty url-prefix() value, which is supported due to its use in Firefox browser detection. Still supported in user stylesheets.
  • Disabled From version 61: this feature is behind the layout.css.moz-document.content.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

Note that Mozilla's compatibility info for Firefox on Android is listed as: ?.