MozillaZine


How to change style of unloaded tabs?

User Help for Mozilla Firefox
mdonatas
 
Posts: 5
Joined: November 17th, 2007, 6:42 am

Post Posted December 13th, 2011, 2:00 am

With "Don't load tabs until selected" option I have many tabs open of which usually only few are loaded. I would like to have a visual indication for unloaded tabs.

Is it possible to change the look of unloaded tabs with say userChrome.css?

LoudNoise
New Member

User avatar
 
Posts: 40048
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Post Posted December 13th, 2011, 7:57 am

Moving to Firefox support
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted December 13th, 2011, 6:50 pm

Not natively. Firefox does not natively include an attribute for tabs for anything related to the status of the tab.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

SoapyHamHocks

User avatar
 
Posts: 80
Joined: January 3rd, 2010, 10:12 pm

Post Posted December 13th, 2011, 7:21 pm

It seems that tabs that are not loaded have an a 'pending' attribute. You can try this:

Code: Select all
.tabbrowser-tab[pending] {
  background-image: -moz-linear-gradient(green,green) !important;
}


Just replace green with some color you like.

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted December 13th, 2011, 7:34 pm

Hmmm... that must be new... I'll have to test that later, might make a nice addition to the themes.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted December 13th, 2011, 7:40 pm

I just checked and that is not the case in Firefox 8. That is either added later or is the result of an extension. Can you confirm in Safe Mode and the current version?
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

SoapyHamHocks

User avatar
 
Posts: 80
Joined: January 3rd, 2010, 10:12 pm

Post Posted December 13th, 2011, 8:09 pm

My mistake it seems it only works on Firefox 10+.

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted December 13th, 2011, 8:31 pm

Something to look forward to next year then!
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted December 13th, 2011, 9:54 pm

I just found these... looks like it's coming sooner... Firefox 9, so this should work for the OP!

https://developer.mozilla.org/en/XUL/Attribute/unread
https://developer.mozilla.org/en/XUL/Attribute/pending
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

mdonatas
 
Posts: 5
Joined: November 17th, 2007, 6:42 am

Post Posted December 14th, 2011, 12:31 am

Superb! That worked like a charm! Thank you very much :)

I ended up using this css, makes pending tabs look similart to what BarTab extension did:
Code: Select all
.tabbrowser-tab[pending] {
  opacity: 0.6 !important;
}

Using Firefox 9 from the Beta channel.

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted December 14th, 2011, 12:54 am

Since I've just learned about this I figured I would share what I'm doing in my theme... greyed out text for the pending tabs and italics text for the unread tabs:

Code: Select all
.tabbrowser-tab[unread]:not([selected="true"]) {
  font-style: italic!important;
}
.tabbrowser-tab[pending]:not([selected="true"]) .tab-text {
  opacity: .75!important;
}
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

zelzel
 
Posts: 1
Joined: February 26th, 2012, 11:56 am

Post Posted February 26th, 2012, 12:15 pm

this looks great. i'd like to use this in all my FF installations.

noob question: is there a way to add these settings through about:config, or is there another simple way to inject this code in so it sticks?
(like a batch file i can run once per installation)

would be fantastic if this was the default - and available under options, too.

thanks!

EDIT:
found this guide for adding a css sheet: is this the best way?
>>>
Bartab was a simple but very useful addon. I'm very grateful for it being there before Firefox implemented it. Thanks.

For those who want Firefox to show unloaded tabs in a similar style as Bartab Lite on Windows:

1) Go to: C:\Users\(your user name)\AppData\Roaming\Mozilla\Firefox\Profiles\(random letters and numbers).default\

2) Create a folder called 'chrome' (without quotes) if you don't see one.

3) Make a css file called 'userChrome' (userChrome.css)

4) Open it up in a text editor of your choice and put in:

.tabbrowser-tab[pending] {
opacity: .5;
}

6) Restart the browser if it isn't closed. Done!
<<<

patrickjdempsey wrote:Since I've just learned about this I figured I would share what I'm doing in my theme... greyed out text for the pending tabs and italics text for the unread tabs:

Code: Select all
.tabbrowser-tab[unread]:not([selected="true"]) {
  font-style: italic!important;
}
.tabbrowser-tab[pending]:not([selected="true"]) .tab-text {
  opacity: .75!important;
}

happysurf

User avatar
 
Posts: 351
Joined: January 20th, 2011, 3:14 am

Post Posted September 13th, 2012, 2:23 am

For me the best idea is change the text color for pending tabs.
Somebody can help me with code?
Thanks.
Surf the Internet is a dirty job but someone has to do it.

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted September 13th, 2012, 9:07 am

color: blue!important;
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

happysurf

User avatar
 
Posts: 351
Joined: January 20th, 2011, 3:14 am

Post Posted September 13th, 2012, 9:40 am

patrickjdempsey wrote:color: blue!important;


Thank you very much, for me this is perfect with FxChrome theme:

.tabbrowser-tab[pending] .tab-text {
color: white!important;
}
Surf the Internet is a dirty job but someone has to do it.

Return to Firefox Support


Who is online

Users browsing this forum: Google [Bot] and 8 guests