Specify urls not to affect wih @-moz-document in stylish

2.7k Views Asked by At

With stylish you can specify a domains using @-moz-document url-prefix(http://) for example.

This applies to all URLs. Is there a way to specify which URLs you don't want the style to affect? This means you could have a global stylesheet that effects everything except specified URLs where there is another stylesheet you want to use.

2

There are 2 best solutions below

0
On BEST ANSWER

This can get tricky but it can be done.
From the the Stylish documentation: "Applying styles to specific sites":

@-moz-document regexp('(?!http://www\.example\.com).*') {
    /* CSS rules here.*/
}

Will activate for all URLs except those that start with http://www.example.com.

1
On

my solution

@-moz-document regexp("^((?!(domain1\.com|domain2\.fr)).)*")
{
   ...YOUR CSS...
}