firefox-gnome-theme/theme/parts/csd.css

182 lines
6.0 KiB
CSS

/* GNOME CSD styles for headerbar on Firefox [tabsintitlebar] */
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#main-window {
-moz-appearance: -moz-window-titlebar !important;
}
/* Headerbar top border corners rounded */
:root[tabsintitlebar]:not([inFullscreen]):not([sizemode="maximized"]) #nav-bar {
border-radius: 7px 7px 0 0 !important;
}
/* Window buttons: at least 1 button */
@media (-moz-gtk-csd-minimize-button), (-moz-gtk-csd-maximize-button), (-moz-gtk-csd-close-button) {
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
padding-right: 50px !important;
}
}
/* Window buttons: at least 2 buttons */
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button),
(-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-close-button),
(-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
padding-right: 90px !important;
}
}
/* Window buttons: 3 buttons */
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
padding-right: 130px !important;
}
}
/* Fullscreen headerbar padding for 1 button */
:root[tabsintitlebar][inFullscreen] #nav-bar {
padding-right: 50px !important;
}
/* Window buttons box */
:root[tabsintitlebar] #titlebar .titlebar-buttonbox-container,
:root[tabsintitlebar] #titlebar-buttonbox-container,
:root[tabsintitlebar][inFullscreen] #window-controls {
-moz-appearance: none !important;
padding: 0 3px 0 4px;
position: absolute !important;
right: 0;
top: 0;
}
:root[tabsintitlebar] #titlebar .titlebar-buttonbox {
-moz-appearance: none !important;
}
/* Window buttons style */
:root[tabsintitlebar] #titlebar .titlebar-button,
:root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton {
-moz-appearance: none !important;
border: 1px solid var(--gnome-button-border-color) !important;
border-color: transparent !important;
border-radius: 5px !important;
height: 34px;
margin: 6px 3px !important;
padding: 0 2px !important;
width: 34px;
}
:root[tabsintitlebar] #titlebar .titlebar-button .toolbarbutton-icon,
:root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton .toolbarbutton-icon {
width: 16px;
}
:root[tabsintitlebar] #titlebar:-moz-window-inactive .titlebar-button .toolbarbutton-icon,
:root[tabsintitlebar][inFullscreen] #window-controls:-moz-window-inactive toolbarbutton .toolbarbutton-icon {
opacity: .5 !important;
}
:root[tabsintitlebar] #titlebar:not(:-moz-window-inactive) .titlebar-button:not([disabled]):hover,
:root[tabsintitlebar][inFullscreen] #window-controls:not(:-moz-window-inactive) toolbarbutton:not([disabled]):hover {
background-image: var(--gnome-button-hover-background);
border-color: var(--gnome-button-border-color) !important;
border-bottom-color: var(--gnome-button-border-accent-color) !important;
box-shadow: var(--gnome-button-box-shadow);
}
:root[tabsintitlebar] #titlebar:not(:-moz-window-inactive) .titlebar-button:not([disabled]):active,
:root[tabsintitlebar][inFullscreen] #window-controls:not(:-moz-window-inactive) toolbarbutton:not([disabled]):active {
background: var(--gnome-button-active-background);
box-shadow: var(--gnome-button-active-box-shadow);
border-color: var(--gnome-button-active-border-color) !important;
}
/* Remove close and minimize buttons from fullscreen buttons */
:root[tabsintitlebar][inFullscreen] #window-controls #close-button,
:root[tabsintitlebar][inFullscreen] #window-controls #minimize-button {
display: none;
}
/* Left window buttons */
@media (-moz-gtk-csd-reversed-placement) {
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
padding-right: 3px !important;
}
/* Window buttons box */
:root[tabsintitlebar] #titlebar .titlebar-buttonbox-container {
padding: 0 3px 0 4px;
left: 0;
right: auto;
}
/* Window controls: at least 1 button */
@media (-moz-gtk-csd-minimize-button), (-moz-gtk-csd-maximize-button), (-moz-gtk-csd-close-button) {
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
padding-left: 50px !important;
}
}
/* Window controls: at least 2 buttons */
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button),
(-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-close-button),
(-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
padding-left: 90px !important;
}
}
/* Window controls: 3 buttons */
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
padding-left: 130px !important;
}
}
}
/* Remove tabsbar titlebar blank spaces */
:root[tabsintitlebar] #TabsToolbar .titlebar-placeholder {
display: none !important;
}
/* Prevent menubar from breaking */
:root[tabsintitlebar] #toolbar-menubar:not([inactive=true]) {
height: 30px !important;
margin-bottom: 8px;
}
/* Remove default style of titlebar */
:root[tabsintitlebar] #titlebar {
-moz-appearance: none !important;
}
/* Fix the issue when dragging tabs */
:root[tabsintitlebar] #navigator-toolbox[movingtab] #TabsToolbar {
padding-bottom: 0 !important;
}
/* Allow window drag with headerbar buttons */
:root[tabsintitlebar] #nav-bar *,
:root[tabsintitlebar] #titlebar .titlebar-button,
:root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton {
-moz-window-dragging: drag;
}
:root[tabsintitlebar] #nav-bar .urlbar-input-box,
:root[tabsintitlebar] #nav-bar .urlbar-input-box *,
#back-button,
#forward-button{
-moz-window-dragging: no-drag !important;
}
/* FF 60 fixes */
:root[tabsintitlebar] #titlebar[style="margin-bottom: -1px;"] {
margin-bottom: -38px !important;
}
:root[tabsintitlebar] #titlebar-content {
display: block !important;
position: absolute;
height: 38px !important;
top: 0 !important;
}
:root[tabsintitlebar] #titlebar-buttonbox {
height: auto !important;
padding: 0 !important;
margin: 0 !important;
}
:root[tabsintitlebar] #titlebar-content .titlebar-button {
padding: 0 7px !important;
}