Notice: The devs are no longer actively involved in the forum, so any bug reports regarding the Stylish extension or this website should be sent to them directly at contact@userstyles.org.
Changing your Avatar.
The only way to currently change a forum avatar is through Gravatar.com. The email address used for your Userstyles.org account must be one of the email addresses that is registered to your Gravatar account.

How to exclude sites from global styles

edited October 2007 in Style Requests
Hello,

I use black text on white background but on some site I loose functionality.

I found this sample:

@-moz-document domain("google.com") {
*|* * {background: inherit !important; color: inherit !important;}
}

but it has no effect.

It seems to be "inherit" that has no effect. If I replace it with a color it works, for example this:

@-moz-document domain("google.com") {
*|* * {background: yellow !important; color: red !important;}
}

So how do I allow certain sites to use their own styles?

Fred
«1

Comments

  • for now you cant exclude urls hopefully in a newer firefox version they'll change that
    you can change the @-moz-doc rule to contain only the urls you wany to apply
    @-moz-document domain("google.com"),domain("userstyles.org") {

    change domain to url if you want to put the exact url (http://userstyles.org/forum/comments.php?DiscussionID=581)
    or url-prefix for websites starting with (http://userstyles.org/forum/comments.php?DiscussionID)

    if you want to use inherit try this
    body{color:black!important;background-color:white!important} *{color:inherit!important;background-color:transparent!important}
  • Thanks, but still no effect. My global code is this:

    * { color: black !important ; background: none !important; background-color: white }

    Fred
  • the code should work unless you have another one enabled

    you dont need background:none if you use background:white (just remember to include !important)
  • Thanks,

    I have disabled all other codes but black text on White background.
    The authors code, http://userstyles.org/styles/554 is:
    * { color: black !important ; background: none !important; background-color: ghostwhite !important }

    If I use the original code it affects dialogs: I get white background behind check-boxes. To avoid this I have to skip "important" after "ghostwhite". So this works:

    * { color: black !important ; background: none !important; background-color: ghostwhite }

    If I try with * { color: black !important ; background: white !important;} or
    * { color: black !important ; background-color: white !important;}
    I also get this white background in check-boxes.

    Is this the exact code you mean I shall use?:
    @-moz-document domain("google.com"),domain("userstyles.org") {
    *{color:inherit!important;background-color:transparent!important}
    }

    Fred
  • edited October 2007
    in the stylish code window goto insert then XUL/HTML namespace

    only applies to websites@namespace url(http://www.w3.org/1999/xhtml);only applies to firefox@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
    for the code i posted above you'd use this@namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("google.com"),domain("userstyles.org") { body{color:black!important;background-color:white!important} *{color:inherit!important;background-color:transparent!important} }if you dont want the authors code to change checkboxes
    @namespace url(http://www.w3.org/1999/xhtml); * { color: black !important ; background: none !important; background-color: ghostwhite !important }
    Posted By: fred6633If I use the original code it affects dialogs: I get white background behind check-boxes. To avoid this I have to skip "important" after "ghostwhite". So this works:

    * { color: black !important ; background: none !important; background-color: ghostwhite }
    im guessing it works in the sense that the firefox css has more priority over your code
  • Thanks,
    This is my exact code and the only one I have tried that doesn't affect checkboxes:

    @namespace url(http://www.w3.org/1999/xhtml);
    * { color: black !important ; background: none !important; background-color: white }

    If I add "important" after "white" I get the checkbox problem.

    Maybe it's a Stylish problem since I don't get the checkbox issue if I use the author's code in userContent.css

    Your code
    @namespace url(http://www.w3.org/1999/xhtml);
    @-moz-document domain("google.com"),domain("userstyles.org") {
    body{color:black!important;background-color:white!important}
    *{color:inherit!important;background-color:transparent!important}
    }
    has no effect

    I use SeaMonkey. Maybe Stylish and the codes at Userstyles primarily are intended for Firefox?

    Fred
  • I've done some testing.

    From what I've found, the codes "background: white !important" and "background-color: white !important" removes much more than "background: inherit/transparent !important" or "background-color: inherit/transparent !important" restore. Inherit/transparent only restores some parts of background-color and no background-images.

    I give up. I temporarily disable the global code on some pages


    Fred
  • are these checkboxs in the program or a website?
    if its a website could you post a link that has a checkbox
  • In the program. The checkboxes are in dialogs in SeaMonkey. For example, if I open the "Add style" dialog in Stylish, there is a checkbox "wrap lines". I get white background under "Wrap lines" It's the same with all checkboxes in SeaMonkey's dialogs. I've just upgraded to the latest Stylish, but there is no difference.

    Fred
  • this is for something else but it may help
    @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
    .checkbox-check{background:none transparent!important;border:none!important;-moz-appearance:none!important}
  • Thanks,

    but this code made the checkboxes disappear and background behind was still white.

    But the "Black and white code" code works as expected when I remove "important".

    From what I understand background colors are lost and "inherit" doesn't keep them.

    http://userstyles.org/forum/comments.php?DiscussionID=343&page=1#Item_6

    Fred
  • edited October 2007
    how about this
    @namespace url(http://www.w3.org/1999/xhtml);
    *{ color: black !important ; background: none white !important}
    .checkbox-check{background:none transparent!important;border:none!important;-moz-appearance:none!important}
    or this
    @namespace url(http://www.w3.org/1999/xhtml);
    *:not(checkbox):not(.checkbox-check) { color: black !important ; background: none !important; background-color: white !important}
    or
    @namespace url(http://www.w3.org/1999/xhtml);
    *:not(checkbox):not(.checkbox-check){color:black!important;background-color:transparent!important}
  • Thanks,

    The first two codes had the same checkbox problem. No checbox problem with the third code, but the background wasn't white.

    Since the author's code works fine with userContent.css, isn't most likely a bug in Stylish?

    If it works with Stylish in Firefox, it seems to me that Stylish does not fully support SeaMonkey?

    Fredrik
  • BTW: All links with the author's code are not blue. Sometimes they are black. Here is an example: http://www.openoffice.org/

    Some links, e g "native language" and "new user & general information", are black.

    Also search words at Google are black.

    Can I add something to the code that makes all links blue?

    Fred
  • {color:blue!important}
    i know i have seamonkey around so i'll see if i can get it working
  • i couldnt change the checkbox background or i'd lose the checkmark so how about these checkboxes/radios?
    *{color:black!important;background:ghostwhite!important} :-moz-any-link{color:blue!important} radiogroup:not(.chromeclass-toolbar) radio[selected="true"], radiogroup:not(.chromeclass-toolbar) radio:not([selected="true"]), treecolpicker menuitem:not([checked="true"])[type="checkbox"], treecolpicker menuitem[checked="true"][type="checkbox"], treechildren::-moz-tree-checkbox, .checkbox-check {list-style-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAgCAQAAAAIlLYPAAAHPElEQVR4Xu2WbXAT1xWGj7yy/MVHDZFBYih1x0hUEjH6YF2c2tSWXTt1AwaSkCHGmQI2kmwYJm2TeMbOHZKBNmXAzTSIMJDB0Exx3Qw0LUldZlJCC6mCcRrLLhY4dlRsyx8K9RcGY1s6PbMr7aymgf5hMv3R98xqR/vcnffcq3uuDvzPyvJk2S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m+EymuGauA61cUh+UFE/Ahrp/qYJn5bzuXScvbV+XYT2cdqJWczFr6cXS3aR1KoNr2sjzmKHTuq606zLvYZa2K76hw7pKNWxhvvy6WWJCkFvlTGdKNWDnRa/cP5M4pVenxKInzF+jexzyQkcl2TFgAAAABJRU5ErkJggg==")!important} radio>.radio-check-box1{display:none!important} .checkbox-check{background:none!important;border:none!important;-moz-appearance:none!important} radiogroup:not(.chromeclass-toolbar) radio[selected="true"]{-moz-image-region:rect(16px 64px 32px 48px)!important} radiogroup:not(.chromeclass-toolbar) radio:not([selected="true"]){-moz-image-region:rect(16px 48px 32px 32px)!important} radiogroup:not(.chromeclass-toolbar) radio[selected="true"]:hover{-moz-image-region:rect(0 64px 16px 48px)!important} radiogroup:not(.chromeclass-toolbar) radio:not([selected="true"]):hover{-moz-image-region:rect(0 48px 16px 32px)!important} .checkbox-check, treecolpicker menuitem:not([checked="true"])[type="checkbox"], treechildren::-moz-tree-checkbox{-moz-image-region:rect(16px 32px 32px 16px)!important} checkbox:hover>.checkbox-check, treecolpicker menuitem:not([checked="true"])[type="checkbox"]:hover, treechildren::-moz-tree-checkbox(selected){-moz-image-region:rect(0 32px 16px 16px)!important} checkbox[checked="true"]>.checkbox-check, treecolpicker menuitem[checked="true"][type="checkbox"], treechildren::-moz-tree-checkbox(checked){-moz-image-region:rect(16px 16px 32px 0)!important} checkbox[checked="true"]:hover>.checkbox-check, treecolpicker menuitem[checked="true"][type="checkbox"]:hover, treechildren:hover:-moz-tree-checkbox(checked,selected){-moz-image-region:rect(0 16px 16px 0)!important}
  • Thanks,
    But I still have white background behind checkboxes. The same code works fine in userContent.css.

    Fredrik
  • which version of seamonkey do you use and are you running windows, linux, or osx ?
    try opening a new window after you apply the style, it might help
  • Thanks,
    I use SeaMonkey 1.1.4 and windows 2000 sp4.

    It didn't help to open a new window.

    I just noticed that more than text behind checkboxes get white background; In the three-view panel in SeaMonkey Mail, the "subject" field and the "date" field get white background field.

    Fredrik
  • 1.1.5 is out btw

    the text behind checkboxes? you mean the square area behind the check? (also what colour is it normally)
  • Thanks, yes I noticed that and installed but no change.

    An example: If I open an "Add Style" window there is a checkbox "Wrap lines". The bottom just under these words gets white. The normal color is grey. The text "Wrap lines" is still black. Also the bottom under "description" gets white. It's the same in all dialogs in SeaMonkey. No possibility to post a screen dump?

    Fred
  • sure post away, i thought you meant the area behind the checkbox :)
  • if this is your problem
    then you can use either
    @namespace url(http://www.w3.org/1999/xhtml); *:not([anonid="accessKeyParens"]):not(.accesskey){color:#000!important;background:ghostwhite!important} :-moz-any-link{color:blue!important}or
    @namespace url(http://www.w3.org/1999/xhtml); *:not(span){color:#000!important;background:ghostwhite!important} :-moz-any-link{color:blue!important}
  • Thanks a lot for solving the problem!
    Yes this was the problem.
    Sorry that I haven't expressed myself very well.
    The second code works perfectly. The first doesn't make links blue.

    Fred
  • Hello again.
    There was even some problems with code two: all text aren't black, e g searches on Google has some green text.

    Fred
  • thats the problem with using :not(span)
    this'll fix it but just the google links
    @namespace url(http://www.w3.org/1999/xhtml); span.a, *:not(span){color:#000!important;background:ghostwhite!important}or try using the first code with
    a{color:blue!important}
    instead of
    :-moz-any-link{color:blue!important}
  • Thanks, but the links are still black with

    a{color:blue!important}

    Fred
  • make sure its in this order
    *{color:#000!important;background:ghostwhite!important}
    a{color:blue!important}
    not this order
    a{color:blue!important}
    *{color:#000!important;background:ghostwhite!important}
  • Thanks,
    Is this the complete code?

    @namespace url(http://www.w3.org/1999/xhtml);
    *:not([anonid="accessKeyParens"]):not(.accesskey){color:#000!important;background:ghostwhite!important}
    a{color:blue!important}

    It doesn't make links blue.

    Fred
  • edited October 2007
    on firefox the priority depends on the order guess its different for seamonkey
    @namespace url(http://www.w3.org/1999/xhtml); *:not(:-moz-any-link):not([anonid="accessKeyParens"]):not(.accesskey){color:#000!important;background:ghostwhite!important} :-moz-any-link{color:#6666d0!important}
    use :link and :visited if you want different colours for visited links
    @namespace url(http://www.w3.org/1999/xhtml); *:not(:-moz-any-link):not([anonid="accessKeyParens"]):not(.accesskey){color:#000!important;background:ghostwhite!important} :link{color:#6666d0!important} :visited{color:#CC0000!important}
    edit:
    using background: will probably remove a bunch of background images that you might find useful you might want to try background-color: instead
Sign In or Register to comment.