2

How do I make this Stylish code apply to only the domain plus.google.com in Firefox?

In Chrome, the Stylish extension allows you to specify for what domain a style should apply - but the Stylish extension for Firefox doesn't let you specify that as part of the extension.

I tried using @-moz-document rules as described on this page, but that didn't seem to work.

Here's the code that I used - it is (despite my attempts) not specific to the plus.google.com domain:

@-moz-document  url-prefix(https://plus.google.com),
            domain(plus.google.com)
{
#contentPane > div {
text-align: center !important;
}

... ...

}

Please help?

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
novice_coder
  • 21
  • 1
  • 2

4 Answers4

3

EDIT: Maybe you need to add the namespace?

@namespace url(http://www.w3.org/1999/xhtml);  
@-moz-document domain('example.com')
{

}
  • Yes, use quotes for the domain and don't use `url-prefix` if it only covers the domain. – Brock Adams May 11 '12 at 09:49
  • Still doesn't work, actually. Thanks for the quick reply - could it be anything else? I'm on Ffox 12.0. Is there a different css extension besides Stylish that you could recommend? – novice_coder May 11 '12 at 17:49
  • Nope. Stylish is the best AFAIK. It's fast, easy to use, and has a semi-large userbase. I have no idea why yours doesn't work, mine is identical to yours ( except for the url-prefix), but it doesn't work.. –  May 12 '12 at 10:39
  • yeah, thanks @BrockAdams, but why the heck doublequotes dont work – Dee Jan 22 '17 at 10:37
  • 1
    @johnlowvale, Double-quotes do work; I use them almost exclusively. If you have a problem, make an MCVE that demonstrates it and ask a new question (after searching for previous questions). – Brock Adams Jan 22 '17 at 21:10
0

I had the same problem, for me it was a syntax error with the brackets. If you click the 'preview' button in the Stylish editor, it will tell you if there are any errors. HTH.

Andrew
  • 617
  • 2
  • 6
  • 19
0

I use Stylish in Firefox to increase Reddit.com's default thumb size from 70px to 140px.

The top line tells Firefox to set the rule on a specific website.

Note: Don't forget to add the { at the end of the first line and } at the very end of the script.

@-moz-document domain("reddit.com") {
.thumbnail {
  width:auto;
  min-height:70px;
  max-height:none !important;}
.thumbnail img {
  width:140px;
  height:auto;
  border-radius: 0;}
a.thumbnail {
  width:auto;
  min-height:70px;}
a.thumbnail img{
  border-radius: 0;}
}
Rick
  • 141
  • 3
  • 16
0

I was stuck by not specifying the 'Applies to' section at the bottom of the edit section. Select URLs on the domain - trello.com

atreeon
  • 21,799
  • 13
  • 85
  • 104