url filter doesn't work in userContent.css
Linux x86_64, Firefox 28
In my userContent.css I have:
@namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain(www.utro.ru) { * { font-family: "Arial" !important; font-size: 10px !important; } } * { font-family: "Verdana" !important; font-size: 15px !important; line-height: 1.3em !important; } h1, h2, h3, h4, h5, h6 { font-family: Verdana !important; font-size: 13px !important; font-weight: bold !important; }
What I expected is to see "www.utro.ru" with Arial font and 10 px size Other pages - with Verdana font and 15px size. But in reality Firefox draws every page with Verdana 15px.
If I remove every other conditions:
@namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain(www.utro.ru) { * { font-family: "Arial" !important; font-size: 10px !important; } }
Firefox starts to draw is expected - Arial 10px. Other pages with default font from configuration.
Is it another bug or I did something wrong? Firefox ignores more then one url filter condition!
Modificat în
Soluție aleasă
nimnull22 wrote:
Thank you. Your solution works as expected.
You're welcome.
nimnull22 wrote:
How to exclude one site.
Here's an example of a global style with an exception. Just replace the placeholders with actual domain names. Add another | symbol followed by the domain name to add another exception.
@-moz-document regexp("https?://(?!(utro.ru|example-of-an-exception.com|www.placeholder.site-exception.net)).*") { /* The following is for all sites except Utro.ru */ * { font-family: "Comic Sans MS" !important; } } /* The following is just for support.mozilla.org It will override the global declaration above */ @-moz-document domain("support.mozilla.org") { * { font-family: "Times New Roman" !important; } }
Citește acest răspuns în context 👍 0
Toate răspunsurile (3)
OK.
Everything works except for one problem.
I need one domain uses its own font and font-size.
How to exclude one site. For example I need it to uses Verdana for sans-serif and Courier New for monospace?
Soluție aleasă
nimnull22 wrote:
Thank you. Your solution works as expected.
You're welcome.
nimnull22 wrote:
How to exclude one site.
Here's an example of a global style with an exception. Just replace the placeholders with actual domain names. Add another | symbol followed by the domain name to add another exception.
@-moz-document regexp("https?://(?!(utro.ru|example-of-an-exception.com|www.placeholder.site-exception.net)).*") { /* The following is for all sites except Utro.ru */ * { font-family: "Comic Sans MS" !important; } } /* The following is just for support.mozilla.org It will override the global declaration above */ @-moz-document domain("support.mozilla.org") { * { font-family: "Times New Roman" !important; } }
@ Gingerbread Man
Thanks a lot for your examples. Now all works as I expected.