From 34bb3b6154bc4b60fe0f2861fc3cf96273a2f387 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Wed, 12 Feb 2025 11:48:27 +0800 Subject: [PATCH] Update csd.css --- src/other/firefox/common/parts/csd.css | 52 ++++++++++++++------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/src/other/firefox/common/parts/csd.css b/src/other/firefox/common/parts/csd.css index 556973a6..a74fca2f 100644 --- a/src/other/firefox/common/parts/csd.css +++ b/src/other/firefox/common/parts/csd.css @@ -2,8 +2,8 @@ @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -/* Headerbar top border corners rounded */ :root[tabsintitlebar], :root[customtitlebar] { +/* Headerbar top border corners rounded */ &:root[sizemode="normal"]:not([gtktiledwindow="true"]) { #nav-bar { border-top-left-radius: env(-moz-gtk-csd-titlebar-radius, 12px) !important; @@ -32,7 +32,6 @@ } } - /* Always show nav bar window buttons*/ #nav-bar > .titlebar-buttonbox-container { display: flex !important; @@ -45,11 +44,6 @@ } } -/* Fullscreen headerbar padding for 1 button */ -&:root[inFullscreen] #nav-bar { - padding-right: 50px !important; -} - /* Window buttons box */ #nav-bar .titlebar-buttonbox-container, #titlebar .titlebar-buttonbox-container, @@ -78,13 +72,7 @@ padding: 2px 0 !important; --inactive-titlebar-opacity: 1 !important; } -&:root[inFullscreen] #nav-bar .titlebar-button, -&:root[inFullscreen] #titlebar .titlebar-button { - height: 24px; - width: 24px; - margin: 12px 4px !important; - padding: 0 !important; -} + #nav-bar .titlebar-button .toolbarbutton-icon, #nav-bar:-moz-window-inactive .titlebar-button .toolbarbutton-icon, #titlebar .titlebar-button .toolbarbutton-icon, @@ -92,14 +80,30 @@ opacity: 0 !important; } -/* Remove close and minimize buttons from fullscreen buttons */ -&:root[inFullscreen] #window-controls #close-button, -&:root[inFullscreen] #window-controls #minimize-button, -&:root[inFullscreen] #titlebar .titlebar-buttonbox .titlebar-close, -&:root[inFullscreen] #titlebar .titlebar-buttonbox .titlebar-min, -&:root[inFullscreen] #nav-bar .titlebar-buttonbox .titlebar-close, -&:root[inFullscreen] #nav-bar .titlebar-buttonbox .titlebar-min { - display: none !important; +/* Fullscreen headerbar */ +&:root[inFullscreen] { + /* Fullscreen headerbar padding for 1 button */ + #nav-bar { + padding-right: 50px !important; + } + + #nav-bar .titlebar-button, + #titlebar .titlebar-button { + height: 24px; + width: 24px; + margin: 12px 4px !important; + padding: 0 !important; + } + + /* Remove close and minimize buttons from fullscreen buttons */ + #window-controls #close-button, + #window-controls #minimize-button, + #titlebar .titlebar-buttonbox .titlebar-close, + #titlebar .titlebar-buttonbox .titlebar-min, + #nav-bar .titlebar-buttonbox .titlebar-close, + #nav-bar .titlebar-buttonbox .titlebar-min { + display: none !important; + } } } @@ -133,7 +137,7 @@ /* Left window buttons */ @media (-moz-gtk-csd-reversed-placement) { -:root[tabsintitlebar], :root[customtitlebar] { + :root[tabsintitlebar], :root[customtitlebar] { &:root:not([inFullscreen]) #nav-bar { padding-right: 6px !important; } @@ -150,7 +154,7 @@ &:root[inFullscreen] #nav-bar { padding-left: 50px !important; } -} + } /* Window controls: at least 1 button */ @media (-moz-gtk-csd-minimize-button), (-moz-gtk-csd-maximize-button), (-moz-gtk-csd-close-button) {