Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

How to make exception rules for Stylish rules which change fonts?

  • 2 个回答
  • 2 人有此问题
  • 15 次查看
  • 最后回复者为 doodiepunk

more options

How to make exception rules for Stylish rules which change fonts? I use Stylish add-on to change specific fonts to other fonts of my choice, but I have a problem. I want to change the font Arial to Tahoma in almost all pages I visit, but with the exception of websites as wikipedia.org. Because of this, I find myself having a very long list of domains to change Arial to Tahoma, only because I don't want that rule to apply to wikipedia.org and additional one or two other websites.

The current rule I'm using is, (my actual list is a lot longer, but this is just an example):
@-moz-document domain("mozilla.org"), domain("thefreelibrary.com"), domain("sil.org"), domain("ethnologue.com") {
@font-face { font-family: 'Arial'; src: local('Tahoma'); }
}

I can't use the following rule because I don't want it to apply to wikipedia.org:
@font-face { font-family: 'Arial'; src: local('Tahoma'); }

How to make exception rules for Stylish rules which change fonts? I use [https://addons.mozilla.org/en-US/firefox/addon/stylish/ Stylish add-on] to change specific fonts to other fonts of my choice, but I have a problem. I want to change the font Arial to Tahoma in almost all pages I visit, but with the exception of websites as wikipedia.org. Because of this, I find myself having a very long list of domains to change Arial to Tahoma, only because I don't want that rule to apply to wikipedia.org and additional one or two other websites. The current rule I'm using is, (my actual list is a lot longer, but this is just an example):<br/> '''''@-moz-document domain("mozilla.org"), domain("thefreelibrary.com"), domain("sil.org"), domain("ethnologue.com") {'''''<br/> '''''@font-face { font-family: 'Arial'; src: local('Tahoma'); }'''''<br/> '''''}''''' I can't use the following rule because I don't want it to apply to wikipedia.org:<br/> '''''@font-face { font-family: 'Arial'; src: local('Tahoma'); }'''''

由doodiepunk于修改

所有回复 (2)

more options

Try something like this:

@font-face { font-family: 'Arial'; src: local('Tahoma'); } 

@-moz-document domain(wikipedia.org){
@font-face { font-family: 'Arial'; src: local('Arial'); } 
}
more options

Actually, I tried this rule before, but it made errors in displaying non-Latin characters :(