Possible to apply styles by tab in Firefox?

edited November 2008 in Stylish
I just started using Stylish. I would use this much, except that when I invoke a CSS it applies to all open tabs (I use the tabmixplus extension, but I doubt that matters). Some styles are good for some pages, and not for others.

I would like to apply certain style sheets to certain tabs, or even to prespecify the use of certain style sheets to certain URLs. Is either of these possible in Stylish or Firefox?



  • You bet, Paul.

    At the top of Stylish you'll see "Insert" you can use that to specify a wide range of URL selectors including anything at a certain domain, a URL that starts with, etc.


  • Ok cool. Then I can preset domains that I want to apply a certain style to.

    Is there any way to apply a style to a tab? I would use this when I wanted to give my eyes a break from long reading. Opera works that way. Only the focused tab and its children take on style sheet changes made on the fly.

  • >> Only the focused tab and its children take on style sheet changes made on the fly.

    As far as I know Stylish can't access the window of the curent tab. All that Stylish can change in the "current tab" - is, literally, the tab itself. In fact I have a Style that changes the current tab to blue.

    A started a thread a while ago:

    Style for the current tab only - possible? - userstyles.org

    I was disappointed to learn that Stylish can't access the current tab so I tried to get Greasemonkey to do it. But Greasemonkey is similar - it isn't designed to be aware of the current tab. People gave me hacks for Greasemonkey - but I'm crap at javasctipt - so I have yet to try them out.

    Today - yet, again - I'm going to try to figure out a lazy/easy way - maybe via a bookmarklet to work on something "like" the current tab. My ideas are probably silly, but if I actually make progress - I'll post in this thread.
  • Yep, your thread gets exactly at what I mean here.

    I currently am changing background color via a bookmarklet on the toolbar:


    Works great, except it has to be reapplied every time I navigate or refresh. Residing in the tab, as Opera does, would be nice.
  • edited November 2008
    This colorizes the current tab (to my liking):

    @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); .tabbrowser-tab[selected="true"] > hbox, .tabbrowser-tab[selected="true"] > .tab-close-button { background-color: #00f !important; color: #00f !important; }

    It's based on this

    Colorize Firefox 2 Active Tab | userstyles.org

    for all other tab stuff - I use Tab Mix Plus

    Tab Mix Plus


    By they way - use code tags for code.



    I just checked - Tab Mix Plus *still* doesn't allow you to set the background color of the current tab.
  • Ok, just to be clear, I'm talking about the background of the page itself, not the tab. I think we understand that, but just to be sure.

    As for CODE, I'm not sure how to implement it in these comments.
  • edited November 2008
    Right - we're on the same wavelength - or in the same "window" if you will. I just showed you the limits of what Stylish can do - which is nothing inside the current tab window.

    I didn't know until I read this thread that it was possible in Opera. I guess that's one more thing Firefox could "borrow" from Opera.


    code example

    <code>As for CODE, I'm not sure how to implement it in these comments.</code>

    As for CODE, I'm not sure how to implement it in these comments.


    Have a look at a new thread I just started...

    a hack to hide/show stuff - userstyles.org

    It might allow you to fool around with some things in the current tab - if you set the greasemonkey script to include all pages. It's a method I just came up with just today after weeks and weeks of trying. I'm still not sure what it can and can't do.
  • BTW, thanks for that tab coloring script. Very nice. It is amazing that TMP doesn't do that, considering how great that extension is.

    As for code, I tried


    and it didn't work. There's nothing in documentation
  • test

    I see. HTML must be selected. Got it.
  • >> HTML must be selected.

    Where is that option? Oh... Sorry - I've posted so often here - I don't even notice the "Format comments" line anymore. In fact

    There's also an edit link.

    The one thing the site doesn't offer is a way to delete your own posts - you have to ask a mod to do it.
Sign In or Register to comment.