[英]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. 我昨晚升级到Firefox 61,我的自定义时尚主题没有应用。 Looking in Stylish I see the code section has the flags
看看时尚我看到代码部分有标志
Unknown @ rule: @-moz-document
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? 是否有一种简单的方法可以用保留样式功能的东西替换
@-moz-document
行?
Mozilla nuked @-moz-document
rules with Firefox version 61. It's supposed to be replaced with @document
(link) , but that doesn't work yet. Mozilla用Firefox版本61修改了
@-moz-document
规则 。它应该被@document
(链接)替换,但是这还不行。
This needs to be addressed in Stylish. 这需要在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. 如果导入工具将
@-moz-document
规则解析为其内部元数据,然后在导入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. 通过快速搜索Stylish GitHub ,我找不到任何关于这个新的Firefox破坏的信息,所以你可能想在那里提出这个问题。
As a temporary workaround , you can set the layout.css.moz-document.content.enabled
pref to true
in about:config
. 作为临时解决方法 ,您可以在
about:config
中将layout.css.moz-document.content.enabled
pref设置为true
。
That won't clear the red error X in the edit dialog, but the script will work. 这不会清除编辑对话框中的红色错误X,但脚本将起作用。
@BrockAdams is correct about the change, but @-moz-document
should still work in userstyles. @BrockAdams对更改是正确的,但
@-moz-document
仍应在用户类型中工作。
The preference he mentions enables it generally , which Mozilla has disabled for security reasons. 他提到的偏好通常会使Mozilla出于安全原因而禁用它。
This about: URL takes you to the preference directly: about:config?filter=layout.css.moz-document.content.enabled
关于:URL直接带您到首选项:
about:config?filter=layout.css.moz-document.content.enabled
From @document : 来自@document :
-moz-
-moz-
url-prefix()
value, which is supported due to its use in Firefox browser detection. url-prefix()
值除外,由于其在Firefox浏览器检测中的使用而受到支持。 Still supported in user stylesheets. layout.css.moz-document.content.enabled
preference (needs to be set to true). layout.css.moz-document.content.enabled
首选项后面(需要设置为true)。 To change preferences in Firefox, visit about:config
. about:config
。 Note that Mozilla's compatibility info for Firefox on Android is listed as: ?
请注意,Mozilla在Android上的Firefox兼容性信息列为:
?
. 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.