MozillaZine

Tab maximum width

User Help for Mozilla Firefox
Vhin
 
Posts: 5
Joined: September 2nd, 2016, 9:15 am

Post Posted February 23rd, 2017, 2:35 pm

I'm using 64-bit Firefox on Windows 8.1.

I'm attempting to set a maximum width for tabs, and I'm having a weird issue.

This is what my userChrome.css looks like:

Code: Select all
@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

.tabbrowser-tab:not([pinned]) {
    max-width: 200px !important;
}


The weirdness is that now, closing a tab doesn't shift the other tabs. It's sort of like a hole in the tab bar. I can't describe it particularly well, so here's a couple screenshots showing it:

Before: http://imgur.com/LWMIIkq
After: http://imgur.com/Up2fjOv

Tabs to the right of the closed tab don't shift left to fill in the space, and I can't manually move a tab there either. It's

If I comment out the max-width in user-chrome.css, it works correctly. I'm not experiencing this issue in the x86 version of Firefox. I've already tried disabling all my extensions. The problem doesn't happen in safe mode, but I think that's just because safe mode doesn't read userChrome.css.

I started to file a bug report with bugzilla, but I was having a lot of problems describing the problem clearly with just text, so I decided to post here first. If anyone has any idea of a workaround (maybe I'm just doing something wrong with userChrome), I'd appreciate it.

Aris

User avatar
 
Posts: 3243
Joined: February 27th, 2011, 10:14 am

Post Posted February 24th, 2017, 1:30 am

Tab width changes do not work properly, if you apply them through userChrome.css, userContent.css, Stylish or a simple css loader. The only way without breaking automatic space removal between tabs is using proper style injection into browsers default css files "on the fly" (e.g. into browser.css). This is how tab width changes work in Classic Theme Restorer, TabMixPlus and TabUtilities.
Believe me there is no "easy" way around this without breaking things.

You have to use JavaScript and something like:

Code: Select all
var ruleEndPosition = document.styleSheets[1].cssRules.length;
document.styleSheets[1].cssRules[document.styleSheets[1].insertRule('.tabbrowser-tab:not([pinned]){}', ruleEndPosition)];
document.styleSheets[1].cssRules[ruleEndPosition].style.maxWidth="200px";

Reflective

User avatar
 
Posts: 2283
Joined: February 15th, 2007, 11:13 am

Post Posted February 24th, 2017, 5:30 am

Download Classic Theme Restorer and then adjust your tabs in the Tabs menu. Here's a screenshot: https://i.imgsafe.org/026d15f791.png

LIMPET235
Moderator

User avatar
 
Posts: 38701
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted February 24th, 2017, 5:40 am

If you get stuck, this extension works with both Min & Max widths...
Why not try...
> https://addons.mozilla.org/en-US/firefo ... th/?src=ss
Ancient Amateur Astronomer
Win-7-HP/IntelĀ® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-57.0-61.0-62.0/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.11.0.
(Always choose the "Custom" Install.)

Vhin
 
Posts: 5
Joined: September 2nd, 2016, 9:15 am

Post Posted February 26th, 2017, 8:40 pm

Sorry for not responding quickly. I've been busy the past couple of days.

LIMPET235 wrote:If you get stuck, this extension works with both Min & Max widths...
Why not try...
> https://addons.mozilla.org/en-US/firefo ... th/?src=ss


I already tried it. It disables e10s, so I'd rather not use it if possible.

Reflective wrote:Download Classic Theme Restorer and then adjust your tabs in the Tabs menu. Here's a screenshot: https://i.imgsafe.org/026d15f791.png


CTR won't work starting in Firefox 57. I've used it before and really like it, but I actually uninstalled it recently (along with Tab Mix Plus, which is in the same boat), because I don't want to rely on addons that will stop working in a few months.

Aris wrote:Tab width changes do not work properly, if you apply them through userChrome.css, userContent.css, Stylish or a simple css loader. The only way without breaking automatic space removal between tabs is using proper style injection into browsers default css files "on the fly" (e.g. into browser.css). This is how tab width changes work in Classic Theme Restorer, TabMixPlus and TabUtilities.
Believe me there is no "easy" way around this without breaking things.

You have to use JavaScript and something like:

Code: Select all
var ruleEndPosition = document.styleSheets[1].cssRules.length;
document.styleSheets[1].cssRules[document.styleSheets[1].insertRule('.tabbrowser-tab:not([pinned]){}', ruleEndPosition)];
document.styleSheets[1].cssRules[ruleEndPosition].style.maxWidth="200px";


Is there any kind of init script file I can put the code in (a la Atom's init.coffee or ~/.zshrc), or would I have to make an extension to to that?

LoveMyFoxy

User avatar
 
Posts: 2246
Joined: December 11th, 2009, 11:23 am
Location: USA

Post Posted February 27th, 2017, 12:36 am

I was just thinking that when the extensions die, we can keep you guys busy composing code instead.... constantly...
2 Desktops--Win 7 Ult. 64-bit, 6GB RAM /Waterfox64 56.2.11/Thunderbird 52.9ESR/Verizon FIOS wired network

LIMPET235
Moderator

User avatar
 
Posts: 38701
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted February 27th, 2017, 2:58 am

LMF...^...
or just stay with an earlier version that just works?
Ancient Amateur Astronomer
Win-7-HP/IntelĀ® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-57.0-61.0-62.0/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.11.0.
(Always choose the "Custom" Install.)

LoveMyFoxy

User avatar
 
Posts: 2246
Joined: December 11th, 2009, 11:23 am
Location: USA

Post Posted February 27th, 2017, 11:12 am

But then we won't be able to pester you as much.
2 Desktops--Win 7 Ult. 64-bit, 6GB RAM /Waterfox64 56.2.11/Thunderbird 52.9ESR/Verizon FIOS wired network

Newbie12
 
Posts: 28
Joined: June 30th, 2015, 8:35 pm

Post Posted June 16th, 2019, 8:56 pm

Aris wrote:You have to use JavaScript and something like:

Code: Select all
var ruleEndPosition = document.styleSheets[1].cssRules.length;
document.styleSheets[1].cssRules[document.styleSheets[1].insertRule('.tabbrowser-tab:not([pinned]){}', ruleEndPosition)];
document.styleSheets[1].cssRules[ruleEndPosition].style.maxWidth="200px";

Where do I insert this code??

Reflective wrote:Download Classic Theme Restorer and then adjust your tabs in the Tabs menu. Here's a screenshot: https://i.imgsafe.org/026d15f791.png

dead link....addon removed....

LIMPET235 wrote:If you get stuck, this extension works with both Min & Max widths...
Why not try...
> https://addons.mozilla.org/en-US/firefo ... th/?src=ss

dead link....addon removed....

LIMPET235 wrote:LMF...^...
or just stay with an earlier version that just works?

Actually you do need to stay with the times since some sites are broken even with the latested 52.9 ESR.... For example Github edit functions doesn't work in Firefox 52.9 ESR.....nor are you able to login in GoG.com website....but yes stay with the older browsers since there aren't equivalent addons or workarounds that work in then newer quantum browser....

Also do any addons exist to get variable tab widths rather than set width?

malliz
Folder@Home

User avatar
 
Posts: 43708
Joined: December 7th, 2002, 4:34 am
Location: Australia

Post Posted June 16th, 2019, 9:23 pm

Any chance you could look at the date of the original posts? The thread is more than two years old for petes sake
What sort of man would put a known criminal in charge of a major branch of government? Apart from, say, the average voter.
"Terry Pratchett"

trolly
Moderator

User avatar
 
Posts: 39905
Joined: August 22nd, 2005, 7:25 am

Post Posted June 17th, 2019, 2:39 am

Locking due to age.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

Return to Firefox Support


Who is online

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