-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userChrome.css tweaks suggestion #1672
Comments
Could you update the wiki by yourself? I'm not use these style rules, so I hope that the page is maintained by users. |
@wheybags Nice! I made the following userChrome.css file with your css code: #main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar {
opacity: 0;
pointer-events: none;
}
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
visibility: collapse !important;
} It uses your CSS code when title bar isn't shown and the Title shown: Title not shown: Extra Space in tab bar: |
I improved the tab hiding when opening the window's menu alternatives with the alt key: /* Make tab area transparent when title is not shown */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar {
opacity: 0;
pointer-events: none;
}
/* Improve Alt-window-menu when title is not shown */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar:-moz-any([autohide="false"] ,:not([inactive="true"])) ~ #TabsToolbar {
visibility: collapse !important;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #titlebar-buttonbox {
height: 33px !important;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar {
padding: 4px !important;
}
/* Hide tab area when title is shown */
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
visibility: collapse !important;
} |
I made another userChrome.css code that shows the window title without the title bar. /* Make tab area transparent when native titlebar is not shown */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar .toolbar-items {
opacity: 0 !important;
pointer-events: none !important;
}
/* Hide tab area when native titlebar is shown */
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
visibility: collapse !important;
}
/* Show title in tab area when native titlebar is not shown */
:root {
--customized-firefox-title-font-size: 1.1em;
--customized-firefox-title-line-height: 30px;
--customized-firefox-title-buttons-width: 150px;
--customized-firefox-title-margin-top: 9px;
--customized-firefox-title-margin-top-extra-fullscreen: calc(7px + var(--customized-firefox-title-fullscreen-title-offset));
--customized-firefox-title-margin-left: calc(9px + var(--customized-firefox-title-icon-size));
--customized-firefox-title-margin-right: calc(var(--customized-firefox-title-buttons-width));
--customized-firefox-title-fullscreen-shrink: 6px;
--customized-firefox-title-fullscreen-alt-shrink: 2px;
--customized-firefox-title-fullscreen-title-offset: calc(-1 * var(--customized-firefox-title-fullscreen-shrink) / 2);
--customized-firefox-title-fullscreen-icon-offset: -4px;
--customized-firefox-title-icon-margin-top: calc(var(--customized-firefox-title-margin-top) - 2px);
--customized-firefox-title-icon-margin-left: 4px;
--customized-firefox-title-icon-size: 16px;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #titlebar::before {
display: block !important;
pointer-events: none !important;
--customized-firefox-title-icon-margin-top-fullscreen-offset: 0px;
--customized-firefox-title-icon-margin-top-alt-offset: 0px;
--customized-firefox-title-icon-margin-top-total: calc(var(--customized-firefox-title-icon-margin-top) + var(--customized-firefox-title-icon-margin-top-alt-offset) + var(--customized-firefox-title-icon-margin-top-fullscreen-offset));
margin-top: var(--customized-firefox-title-icon-margin-top-total) !important;
margin-bottom: calc(-1 * (var(--customized-firefox-title-icon-size) + var(--customized-firefox-title-icon-margin-top-total))) !important;
padding-top: var(--customized-firefox-title-icon-size) !important;
margin-left: var(--customized-firefox-title-icon-margin-left) !important;
opacity: 1 !important;
content: "" !important;
background-size: var(--customized-firefox-title-icon-size) !important;
background-image: url(chrome://branding/content/icon32.png#) !important;
background-repeat: no-repeat !important;
}
/* Apply Theme color to title */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]):-moz-lwtheme #navigator-toolbox {
background-color: var(--chrome-background-color) !important;
}
/* Hide Theme colored element in front of title */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #navigator-toolbox {
background-color: unset !important;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"])::before {
display: block !important;
position: relative !important;
pointer-events: none !important;
color: var(--titlebar-text-color) !important;
content: attr(title) !important;
word-break: break-all !important;
overflow: hidden !important;
line-height: var(--customized-firefox-title-line-height) !important;
--customized-firefox-title-margin-top-total: calc(-1 * (var(--customized-firefox-title-line-height) * 0.5) + var(--customized-firefox-title-margin-top) + 5px);
--customized-firefox-title-margin-bottom-total: calc(-1 * (var(--customized-firefox-title-line-height) + var(--customized-firefox-title-margin-top-total)));
font-size: var(--customized-firefox-title-font-size) !important;
margin-top: var(--customized-firefox-title-margin-top-total) !important;
margin-bottom: var(--customized-firefox-title-margin-bottom-total) !important;
max-height: 0px !important;
margin-left: var(--customized-firefox-title-margin-left) !important;
margin-right: var(--customized-firefox-title-margin-right) !important;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]):not(:-moz-lwtheme)::before {
color: white !important;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]):-moz-window-inactive::before {
opacity: 0.65 !important;
}
#main-window[tabsintitlebar="true"][sizemode="maximized"]:not([extradragspace="true"])::before {
margin-top: calc(var(--customized-firefox-title-margin-top-total) + var(--customized-firefox-title-margin-top-extra-fullscreen)) !important;
margin-bottom: calc(var(--customized-firefox-title-margin-bottom-total) - var(--customized-firefox-title-margin-top-extra-fullscreen)) !important;
}
/* Shrink in Fullscreen */
#main-window[tabsintitlebar="true"][sizemode="maximized"]:not([extradragspace="true"]) #toolbar-menubar:not(:-moz-any([autohide="false"], :not([inactive="true"]))) ~ #TabsToolbar .titlebar-buttonbox-container {
margin-top: 4px !important;
margin-bottom: -0px !important;
}
#main-window[tabsintitlebar="true"][sizemode="maximized"]:not([extradragspace="true"]) #titlebar::before {
--customized-firefox-title-icon-margin-top-fullscreen-offset: var(--customized-firefox-title-fullscreen-icon-offset);
}
#main-window[tabsintitlebar="true"][sizemode="maximized"]:not([extradragspace="true"]) #toolbar-menubar:not(:-moz-any([autohide="false"], :not([inactive="true"]))) ~ #TabsToolbar {
margin-top: -9px !important;
}
/* Improve Alt-window-menu when native titlebar is not shown and title is shown */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar:-moz-any([autohide="false"], :not([inactive="true"])) #menubar-items menu {
font-size: 0.9em !important;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]):-moz-window-inactive #toolbar-menubar:-moz-any([autohide="false"], :not([inactive="true"])) #menubar-items menu {
opacity: 0.65 !important;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar[autohide="false"]:not([inactive="true"]) #menubar-items {
margin-top: 29px !important;
;
margin-bottom: -35px !important;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar[autohide="false"]:not([inactive="true"]) ~ #TabsToolbar {
margin-bottom: -14px;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar[autohide="true"]:not([inactive="true"]) .titlebar-buttonbox {
padding-bottom: 15px;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar[autohide="true"]:not([inactive="true"]) #menubar-items {
margin-top: 30px !important;
;
margin-bottom: -35px !important;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar[autohide="true"]:not([inactive="true"]) ~ #TabsToolbar {
margin-top: -13px;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar[autohide="true"]:not([inactive="true"]) ~ #TabsToolbar .toolbar-items {
visibility: collapse;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #toolbar-menubar[autohide="true"]:not([inactive="true"]) {
height: 45px !important;
}
#main-window[tabsintitlebar="true"][sizemode="maximized"]:not([extradragspace="true"]) #toolbar-menubar:-moz-any([autohide="false"], :not([inactive="true"])) #menubar-items {
margin-top: 24px !important;
;
margin-bottom: -35px !important;
}
#main-window[tabsintitlebar="true"][sizemode="maximized"]:not([extradragspace="true"]) #toolbar-menubar[autohide="false"] ~ #TabsToolbar {
margin-bottom: -19px;
}
#main-window[tabsintitlebar="true"][sizemode="maximized"]:not([extradragspace="true"]) #toolbar-menubar[autohide="true"]:not([inactive="true"]) ~ #TabsToolbar {
margin-bottom: -7px;
} |
I updated the wiki with this code: #1672 (comment) |
@piroor I found a fairly good looking dark tree-style tabs userChrome.css tweak: Should this be added to the wiki? |
@stefnotch Yes, I hope that the snippets page is maintained by people. |
at https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#for-userchromecss you suggest some css to hide the normal top tab bar, but you get some messed up overlaying of the normal window management buttons on windows:
I've been using
Which works much better:

The topbar essentially returns to behaving like a normal windows window border.
The text was updated successfully, but these errors were encountered: