From b463ed1265956287162874bba8ddf8720daf717b Mon Sep 17 00:00:00 2001 From: Colin Reeder Date: Sun, 6 Oct 2024 01:36:46 -0600 Subject: [PATCH] firefox: Update userChrome snippets --- firefox/userChrome.css | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/firefox/userChrome.css b/firefox/userChrome.css index 94f43cf..8cab298 100644 --- a/firefox/userChrome.css +++ b/firefox/userChrome.css @@ -1,15 +1,14 @@ /* https://github.com/MrOtherGuy/firefox-csshacks/blob/master/chrome/compact_urlbar_megabar.css */ -/* Make urlbar megabar appear more compact */ /* Make urlbar appear more compact */ #urlbar[breakout]{ margin-inline-start: 0px !important; width: 100% !important; left: 0 !important; - top: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2 ) !important; + top: calc((var(--urlbar-container-height) - var(--urlbar-height)) / 2 ) !important; } #urlbar[breakout]:not([open]){ - bottom: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important; + bottom: calc((var(--urlbar-container-height) - var(--urlbar-height)) / 2) !important; } .urlbarView{ margin-inline: 0 !important; @@ -24,7 +23,7 @@ #urlbar-background{ animation: none !important; } -#urlbar-input-container{ +.urlbar-input-container{ padding: 0px 1px !important; height: initial !important; } @@ -46,9 +45,10 @@ See the above repository for updates as well as full license text. */ :root[id]{ --tab-block-margin: 0px !important; --tabs-shadow-size: 1px !important; - + /* Remove next line if you want selected tab to have color other than toolbar background - then it follows your theme color */ - --lwt-selected-tab-background-color: var(--toolbar-bgcolor) !important; + --tab-selected-bgcolor: var(--toolbar-bgcolor) !important; + --lwt-selected-tab-background-color: var(--toolbar-bgcolor) !important; /* this is same for fx < 119 */ } /* Uncomment next line to force specific color for tab top line */ @@ -68,25 +68,25 @@ See the above repository for updates as well as full license text. */ --toolbarbutton-inner-padding: 7px !important; } /* Few exceptions for default light theme */ -#navigator-toolbox:not([movingtab]):-moz-lwtheme > #titlebar > #TabsToolbar{ +:root[lwtheme] #navigator-toolbox:not([movingtab]) > #TabsToolbar, +:root[lwtheme] #navigator-toolbox:not([movingtab]) > #titlebar > #TabsToolbar{ --toolbar-bgcolor: transparent; } - +/* Uncomment this for Fx < 119 .tab-background[selected]:not(:-moz-lwtheme){ background: var(--toolbar-bgcolor) !important; } - +*/ #TabsToolbar-customization-target > .toolbarbutton-1 > .toolbarbutton-badge-stack, #TabsToolbar-customization-target > .toolbarbutton-1 > .toolbarbutton-icon{ border-radius: 2px !important; } /* tabs newtab button needs some special styling... */ #tabs-newtab-button{ padding-inline: 0 !important; - -moz-box-align: stretch !important; /* Fx < 112 compatibility */ align-items: stretch !important; } /* We draw the icon as background-image to get correct scaling regardless of toolbar height */ #tabs-newtab-button > .toolbarbutton-icon{ - border-radius: 0 !important; - width: var(--tab-min-height) !important; + border-radius: 0 !important; + width: var(--tab-min-height) !important; height: initial !important; list-style-image: none; background-image: url(chrome://global/skin/icons/plus.svg); @@ -128,10 +128,18 @@ See the above repository for updates as well as full license text. */ border-top: 0 !important; outline: none !important; } - +/* This next rule set is needed for Fx 120, otherwise themes with translucent tabs would seem to have extra border separating them from toolbar below. */ +:root[lwtheme] #tabbrowser-tabs:not([movingtab]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab > .tab-stack > .tab-background:is([selected], [multiselected]){ + background-attachment: scroll, fixed, fixed !important; + background-color: transparent !important; + background-image: linear-gradient(var(--tab-selected-bgcolor, transparent), var(--tab-selected-bgcolor, transparent)), var(--lwt-additional-images,none), var(--lwt-header-image, none) !important;; + background-position: 0 0, var(--lwt-background-alignment), right top !important; + background-repeat: repeat-x, var(--lwt-background-tiling), no-repeat !important; + background-size: auto 100%, var(--lwt-background-size, auto auto), auto auto !important; +} .tab-background:not([selected])[multiselected]{ background: color-mix(in srgb, currentColor 11%, transparent) !important; - margin-inline-start: -1px; + margin-inline-start: -1px; } /* Line to mark selected tab */ @@ -158,10 +166,14 @@ See the above repository for updates as well as full license text. */ /* moves context-line to the bottom */ .tab-context-line{ - -moz-box-ordinal-group: 2; /* Fx < 112 compatibility */ order: 2; margin-inline: 10px !important; } +#titlebar{ + will-change: unset !important; + transition: none !important; + opacity: 1 !important; +} /* https://reddit.com/r/FirefoxCSS/comments/18nuki7/is_there_a_way_to_stop_tabs_in_ff122_from_being/kedcckc/ */ :root[tabsintitlebar] #titlebar:-moz-window-inactive { -- 2.45.2