Search code examples
cssfirefoxstylish

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


I upgraded to Firefox 61 last night and my custom Stylish theme isn't being applied. Looking in Stylish I see the code section has the flags

Unknown @ rule: @-moz-document

The code is:

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("outlook.office.com") {
.ms-border-color-themeSecondary, .ms-bcl-ts, .ms-border-color-themeSecondary-hover:hover, .ms-border-color-themeSecondary-focus:focus, .ms-border-color-themeSecondary-before::before, .ms-bcl-ts-h:hover, .ms-bcl-ts-f:focus, .ms-bcl-ts-b::before{
  border-color:red;
  }


._cb_l2{
  border-bottom-style: solid;
  border-bottom-width: 3px;
}

._cb_n2{
  z-index: 10;
}

@U._cb_s2{
    border-bottom-style: solid;
    border-bottom-width: 3px;
}

  ._cb_u2{
    z-index: 10;
  }
}

Is there an easy way to replace the @-moz-document line with something that will preserve the style functionality?


Solution

  • 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.