MrOtherGuy / firefox-csshacks

Collection of userstyles affecting the browser
Mozilla Public License 2.0
3.19k stars 312 forks source link

Hidden New Tab button in multi-row_tabs.css #237

Open sonofevil opened 1 year ago

sonofevil commented 1 year ago

This rule hides the new tab button when it is not a descendent of #tabbrowser-tabs but rather becomes a direct descendent of #TabsToolbar (and hence a sibling of #tabbrowser-tabs), such as when other buttons are added to #TabsToolbar:

#alltabs-button,
:root:not([customizing]) #TabsToolbar #new-tab-button,
#tabbrowser-arrowscrollbox > spacer,
.tabbrowser-tab::after{ display: none !important }

Why? Why would you not need that button in that case?

MrOtherGuy commented 1 year ago

Can't remember, but I think it's pretty likely the my reasoning when writing that rule was that nobody using multi-row_tabs.css would want newtab-button that took the full height of all the rows. And also because by hiding it there won't be a chance that Firefox would try to show it if under any circumstances even if it would put tabbrowser-tabs to overflow mode (I sort of rememeber that was kind-of an issue long time ago that when opening a new tab Firefox could sometimes enable overflow mode for a split second)

sonofevil commented 1 year ago

If I'm seeing it right then the rule only applies when other buttons are added to the tab toolbar, so there would be other buttons taking up the full height anyway. Doesn't seem like the new tab button would make much of a difference then.

MrOtherGuy commented 1 year ago

Yeah, that's one way to make the newtab-button appear. But you don't have to add any buttons there, it is also shown if the tabs simply overflow, which indeed shouldn't happen with multi-row tabs, but it did happen for split second when opening tabs at some point in time.