diff --git a/src/browser/base/content/ZenUIManager.mjs b/src/browser/base/content/ZenUIManager.mjs index 483d7210c..32c8f406f 100644 --- a/src/browser/base/content/ZenUIManager.mjs +++ b/src/browser/base/content/ZenUIManager.mjs @@ -210,10 +210,10 @@ var gZenVerticalTabsManager = { const isVerticalTabs = Services.prefs.getBoolPref('zen.tabs.vertical'); const isSidebarExpanded = Services.prefs.getBoolPref('zen.view.sidebar-expanded') || !isVerticalTabs; const isRightSide = Services.prefs.getBoolPref('zen.tabs.vertical.right-side') && isVerticalTabs; - const isSingleToolbar = Services.prefs.getBoolPref('zen.view.use-single-toolbar') && (isVerticalTabs && isSidebarExpanded) || !isVerticalTabs; + const isSingleToolbar = (Services.prefs.getBoolPref('zen.view.use-single-toolbar') && (isVerticalTabs && isSidebarExpanded) )|| !isVerticalTabs; const titlebar = document.getElementById('titlebar'); - gBrowser.tabContainer.setAttribute('orient', isVerticalTabs ? 'vertical' : 'horizontal'); + gBrowser.tabContainer.setAttribute('orient', isVerticalTabs ? 'vertical' : 'vertical'); gBrowser.tabContainer.arrowScrollbox.setAttribute('orient', isVerticalTabs ? 'vertical' : 'horizontal'); const buttonsTarget = document.getElementById('zen-sidebar-top-buttons-customization-target'); @@ -355,4 +355,4 @@ var gZenVerticalTabsManager = { const newVal = !Services.prefs.getBoolPref('zen.tabs.vertical.right-side'); Services.prefs.setBoolPref('zen.tabs.vertical.right-side', newVal); }, -}; \ No newline at end of file +}; diff --git a/src/browser/base/content/zen-styles/zen-browser-ui.css b/src/browser/base/content/zen-styles/zen-browser-ui.css index 45ed69a55..55349367c 100644 --- a/src/browser/base/content/zen-styles/zen-browser-ui.css +++ b/src/browser/base/content/zen-styles/zen-browser-ui.css @@ -98,14 +98,6 @@ .titlebar-buttonbox-container { height: 100%; - - & .titlebar-buttonbox { - align-items: center; - - & .titlebar-button { - height: 100%; - } - } } @media (-moz-platform: macos) { diff --git a/src/browser/base/content/zen-styles/zen-sidebar-panels.css b/src/browser/base/content/zen-styles/zen-sidebar-panels.css index 9c429294c..5898f1906 100644 --- a/src/browser/base/content/zen-styles/zen-sidebar-panels.css +++ b/src/browser/base/content/zen-styles/zen-sidebar-panels.css @@ -170,7 +170,7 @@ } #zen-sidebar-web-panel-wrapper { - margin: var(--zen-element-separation) calc(var(--zen-element-separation) / 2) var(--zen-element-separation) var(--zen-element-separation); + margin: 0 calc(var(--zen-element-separation) / 2) var(--zen-element-separation) var(--zen-element-separation); } #zen-sidebar-web-panel[pinned='true'] { diff --git a/src/browser/base/content/zen-styles/zen-tabs/horizontal-tabs.css b/src/browser/base/content/zen-styles/zen-tabs/horizontal-tabs.css index 29dcc61cb..49b1ab13f 100644 --- a/src/browser/base/content/zen-styles/zen-tabs/horizontal-tabs.css +++ b/src/browser/base/content/zen-styles/zen-tabs/horizontal-tabs.css @@ -19,14 +19,17 @@ -webkit-box-orient: horizontal; -webkit-box-pack: start; max-width: 10000px !important; + + --tabstrip-min-height: calc(var(--tab-min-height) - 4 * var(--tab-block-margin)); + --tab-min-height: 10px !important; } #vertical-pinned-tabs-container-separator { display: none !important; } - #zen-essentials-container, - #vertical-pinned-tabs-container, + #zen-essentials-container, + #vertical-pinned-tabs-container, #tabbrowser-arrowscrollbox { -webkit-box-flex: 1; } @@ -41,12 +44,13 @@ } #navigator-toolbox { flex-direction: row !important; + align-items: center; } #titlebar { flex-direction: row !important; width: 100%; - height: 40px !important; + height: 36px !important; } #zen-essentials-container { @@ -71,9 +75,7 @@ } .tabbrowser-tab[zen-glance-tab="true"] { - .tab-content { - } - + .tab-label-container { display: none !important; width: 0px !important; @@ -110,20 +112,24 @@ container-name: tab-container; container-type: normal; max-width: 36px !important; - flex: 1 1 36px !important; + flex: 1 1 36px !important; } #vertical-pinned-tabs-container { container-name: tab-container; container-type: normal; max-width: 36px !important; min-width: 36px !important; - flex: 1 1 36px !important; + flex: 1 1 36px !important; } #vertical-pinned-tabs-container .tab-close-button { display: none !important; } + #vertical-pinned-tabs-container .tab-reset-button { + display: none !important; + } + #vertical-pinned-tabs-container .tab-label-container { display: none !important; } @@ -133,16 +139,21 @@ } .tabbrowser-tab { - container-name: tab-container; - container-type: normal; - max-width: 200px !important; - min-width: 36px !important; - flex: 1 1 150px !important; + container-name: tab-container; + container-type: normal; + min-width: 40px !important; + flex: 1 1 150px !important; + width: -moz-available; + + &:is(:hover, [visuallyselected]) .tab-close-button { + display: block; + --tab-inline-padding: 0; /* Avoid weird padding */ + margin-inline-end: 0 !important; + } } .tabbrowser-tab[selected] { - flex: 2 1 150px !important; - min-width: 32px !important; + flex: 2 0 150px !important; } @container tab-container (max-width: 80px) { @@ -199,21 +210,6 @@ background: hsl(255, 10%, 100%); } - slot { - flex-direction: row !important; - } - - box.scrollbox-clip scrollbox slot { - display: flex !important; - width: 100% !important; - overflow: hidden !important; - } - - .menupopup-arrowscrollbox > slot:nth-child(1) { - display: flex; - flex-direction: column !important; - } - /* Other UI Elements */ #zen-current-workspace-indicator { display: none !important; @@ -251,9 +247,8 @@ min-width: 390px !important; } - - #zen-essentials-container:not(:empty), - #vertical-pinned-tabs-container:not(:empty), + #zen-essentials-container:not(:empty), + #vertical-pinned-tabs-container:not(:empty), #tabbrowser-arrowscrollbox { -webkit-box-flex: 1; min-width: min-content; @@ -289,6 +284,11 @@ visibility: collapse !important; } + #nav-bar { + width: unset !important; + min-width: 500px !important; + } + #tabbrowser-arrowscrollbox-periphery { margin: 0 !important; } @@ -306,7 +306,7 @@ height: 3px !important; } - .tabbrowser-tab[zen-glance-tab="true"] { + .tabbrowser-tab[zen-glance-tab="true"] { flex-basis: fit-content !important; max-width: 36px !important; } @@ -324,7 +324,7 @@ -webkit-box-flex: 0 !important; min-width: min-content; width: auto !important; - + .toolbarbutton-text { display: none !important; } diff --git a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css index f3ba95b57..fdd3560a0 100644 --- a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css +++ b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css @@ -1,845 +1,860 @@ - #tabbrowser-tabs, - #TabsToolbar, - #titlebar, - #TabsToolbar-customization-target { - flex-direction: column; - height: 100%; + +#tabbrowser-tabs, +#TabsToolbar, +#titlebar, +#TabsToolbar-customization-target { + flex-direction: column; + height: 100%; +} + +:root[zen-single-toolbar='true'] { + & #zen-appcontent-navbar-container, + & #zen-sidebar-top-buttons { + --zen-toolbar-height: 32px; + height: var(--zen-toolbar-height); } - :root[zen-single-toolbar='true'] { - & #zen-appcontent-navbar-container, - & #zen-sidebar-top-buttons { - --zen-toolbar-height: 32px; - height: var(--zen-toolbar-height); + & #zen-sidebar-top-buttons .toolbarbutton-1 { + & > .toolbarbutton-icon { + padding: 5px; + } + } + + & #zen-sidebar-top-buttons-separator { + width: 100%; + } +} + +@media (-moz-bool-pref: 'zen.tabs.vertical') { + :root:not([zen-window-buttons-reversed='true']) { + & .titlebar-buttonbox-container { + margin-left: auto; + width: fit-content; } - & #zen-sidebar-top-buttons .toolbarbutton-1 { - & > .toolbarbutton-icon { - padding: 5px; + &:root[zen-right-side='true'] #zen-sidebar-top-buttons-customization-target .titlebar-buttonbox-container { + /* Must have the zen-sidebar-top-buttons-customization-target so we target it only when it's on the sidebar */ + margin-right: calc(-2 * var(--zen-toolbox-padding)); + margin-top: -10px /*Make sure this stays synced with the top buttons' margin!*/; + + & .titlebar-button { + align-items: end; + } + } + } +} + +:root[zen-window-buttons-reversed='true'] .titlebar-buttonbox-container { + margin-right: auto; + width: fit-content; +} + +#TabsToolbar > * { + justify-content: center; +} + +#private-browsing-indicator-with-label { + display: none !important; +} + +#browser { + --zen-toolbox-padding: calc(var(--zen-element-separation) / 1.5); + :root[zen-no-padding='true'] & { + --zen-toolbox-padding: 4px; + } +} + +:root[zen-single-toolbar='true'] { + #urlbar-container { + width: -moz-available !important; + } + + .sharing-icon, + #identity-icon, + .urlbar-icon, + #permissions-granted-icon, + #tracking-protection-icon, + #tracking-protection-icon-box, + #blocked-permissions-container > .blocked-permission-icon { + width: 12px; + height: 12px; + } + + #identity-icon-box, + #identity-permission-box { + margin-top: auto; + margin-bottom: auto; + padding: 6px !important; + } + + & #urlbar-container, + & #urlbar { + --urlbar-container-height: 40px !important; + --urlbar-height: 38px !important; + } + + & #nav-bar { + margin-bottom: 8px; + } + + & #zen-sidebar-top-buttons { + margin: 4px 0; + } + + & #PanelUI-menu-button { + padding: 0 !important; + } +} + +#vertical-pinned-tabs-container-separator { + background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1)); + margin: 8px auto; + border: none; + height: 1px; + width: 98%; + + #vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + & { + display: none; + } +} + +#navigator-toolbox { + --border-radius-medium: 8px; + --tab-border-radius: var(--border-radius-medium); + --zen-toolbox-min-width: 1px; + + --tab-hover-background-color: color-mix(in srgb, var(--toolbarbutton-hover-background) 50%, transparent 50%); + + min-width: var(--zen-toolbox-min-width); + margin-top: 0 !important; /* Fix full screen mode */ + + padding-bottom: var(--zen-element-separation) !important; + + border: none; + order: 0 !important; + + display: flex; + + & toolbarspring { display: none; } +} + +.titlebar-spacer[type='pre-tabs'], +.titlebar-spacer[type='post-tabs'] { + display: none; +} + +:root[zen-single-toolbar='true']:not([customizing]) { + #zen-appcontent-navbar-container { + display: flex; + -moz-window-dragging: drag; + min-height: var(--zen-element-separation); + height: var(--zen-element-separation); + + & #PersonalToolbar { + width: -moz-available; + } + + /* We enable this trick IF we follow any of theses conditions: + * - We are on a Mac + * - We are on a Linux with reversed CSD + * - If we are not in any of the above, we can still enable it if the user has bookmarks toolbar enabled + */ + &:has(#PersonalToolbar[collapsed='false']) { +%include vertical-tabs-topbar.inc.css + } + + &[should-hide='true'] { +%include vertical-tabs-topbar.inc.css + } + + :root[zen-window-buttons-reversed='true'] & { + &:has(#PersonalToolbar[collapsed="true"]) { + display: none; + } + } + } +} + +#TabsToolbar-customization-target { + position: relative; + max-width: 100%; + gap: 0; + &::after { + content: ''; + display: block; + height: 1px; + + margin: 0 auto; + width: 80%; + left: 50%; + transform: translateX(-50%); + position: absolute; + bottom: calc(-1 * var(--zen-toolbox-padding)); + } + + @media (-moz-bool-pref: 'zen.view.show-bottom-border') { + &::after { + background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1)); + } + } + + & > * { + border-top-width: 0 !important; + } +} + +#vertical-tabs-newtab-button { + &:hover, + &:not(:is(:hover, :active)) .toolbarbutton-icon { + background: transparent !important; + } +} + +#tabbrowser-tabs { + margin-inline-start: 0 !important; + padding-inline-start: 0 !important; + + --tab-inner-inline-margin: 0; + + position: relative; + border-bottom: 0px solid transparent !important; + + --tab-block-margin: 2px; + --tab-selected-bgcolor: light-dark(rgba(255,255,255,.8), rgba(255,255,255,.25)); + grid-gap: 0 !important; + + &[overflow]::after, + #vertical-tabs-newtab-button { + /* Hide separator they give us, eww */ + display: none !important; + } + + & .tabbrowser-tab { + animation: none; + transition: none; + &[fadein='true']:not([zen-essential='true']) { + #tabbrowser-tabs[zen-workspace-animation='previous'] & { + animation: zen-slide-in-reverse 0.2s ease-in-out; + } + + #tabbrowser-tabs[zen-workspace-animation='next'] & { + animation: zen-slide-in 0.2s ease-in-out; + } + + &[pinned] { + animation-delay: .03s !important; } } - & #zen-sidebar-top-buttons-separator { - width: 100%; + max-width: unset; + padding: 0 !important; + + position: relative; + border-radius: var(--border-radius-medium); + + & .tab-background { + overflow: hidden; + + & .tab-context-line { + margin: 0 0px !important; + width: 3px !important; + } + } + + &[selected] .tab-background { + backdrop-filter: blur(10px); + } + + @media (-moz-bool-pref: 'zen.tabs.dim-pending') { + &[pending='true'] .tab-icon-image { + opacity: 0.5; + } + } + + /* We have a tab inside a tab, this means, it's a glance tab */ + & .tabbrowser-tab { + border-radius: 5px; + pointer-events: none; + margin: 0; + --toolbarbutton-inner-padding: 0; + + & .tab-background { + background: transparent; + box-shadow: none !important; + } + & label { display: none !important; } + & .tab-close-button, + & .tab-reset-button { + display: none !important; + } + + & .tab-icon-image { + --toolbarbutton-inner-padding: 0 !important; + } + } + + /* On essentials, glance tabs are floating */ + &[zen-essential='true'] .tabbrowser-tab { + position: absolute; + top: 3px; + right: 5px; + --tab-collapsed-width: 15px; + --tab-min-height: 15px; + width: var(--tab-collapsed-width) !important; + z-index: 1; + pointer-events: none; } } +} - :root:not([zen-window-buttons-reversed='true']) .titlebar-buttonbox-container { - margin-left: auto; - width: fit-content; +#zen-sidebar-icons-wrapper { + background: transparent; + gap: 5px; + align-items: center; + + padding-top: var(--zen-element-separation); + + & > toolbarbutton:not(#zen-workspaces-button) { + padding: 0 !important; + } +} + +#newtab-button-container { + display: none !important; +} + +#tabbrowser-arrowscrollbox { + &::part(scrollbox) { + gap: 0px !important; } - :root[zen-window-buttons-reversed='true'] .titlebar-buttonbox-container { - margin-right: auto; - width: fit-content; + &::part(overflow-start-indicator), + &::part(overflow-end-indicator) { + display: none !important; + } +} + +#vertical-pinned-tabs-container { + padding-inline-end: 0 !important; + display: flex !important; + flex-direction: column; + + & .tabbrowser-tab:not(:hover) .tab-background:not([selected]):not([multiselected]) { + background: transparent !important; } - #TabsToolbar > * { + & .tabbrowser-tab .tab-content { + display: flex; + align-items: center; justify-content: center; } - #private-browsing-indicator-with-label { - display: none !important; + .tabbrowser-tab[zen-glance-tab='true'] { + width: fit-content !important; + } +} + +/* Mark: toolbox as expanded */ +#navigator-toolbox[zen-sidebar-expanded='true'] { + --zen-toolbox-min-width: fit-content; + --tab-icon-end-margin: 8.5px; + padding: var(--zen-toolbox-padding); + padding-left: 0; + padding-top: 0; + z-index: 1; + + & #titlebar { + min-width: 150px; } - #browser { - --zen-toolbox-padding: calc(var(--zen-element-separation) / 1.5); - :root[zen-no-padding='true'] & { - --zen-toolbox-padding: 4px; - } + & #tabbrowser-arrowscrollbox-periphery { + margin-inline: var(--tab-block-margin); } - :root[zen-single-toolbar='true'] { - #urlbar-container { - width: -moz-available !important; - } - - .sharing-icon, - #identity-icon, - .urlbar-icon, - #permissions-granted-icon, - #tracking-protection-icon, - #tracking-protection-icon-box, - #blocked-permissions-container > .blocked-permission-icon { - width: 12px; - height: 12px; - } - - #identity-icon-box, - #identity-permission-box { - margin-top: auto; - margin-bottom: auto; - padding: 6px !important; - } - - & #urlbar-container, - & #urlbar { - --urlbar-container-height: 40px !important; - --urlbar-height: 38px !important; - } - - & #nav-bar { - margin-bottom: 8px; - } - - & #zen-sidebar-top-buttons { - margin: 4px 0; - } - - & #PanelUI-menu-button { - padding: 0 !important; - } - } - - #vertical-pinned-tabs-container-separator { - background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1)); - margin: 8px auto; - border: none; - height: 1px; - width: 98%; - - #vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + & { - display: none; - } - } - - #navigator-toolbox { - --border-radius-medium: 8px; - --tab-border-radius: var(--border-radius-medium); - --zen-toolbox-min-width: 1px; - - --tab-hover-background-color: color-mix(in srgb, var(--toolbarbutton-hover-background) 50%, transparent 50%); - - min-width: var(--zen-toolbox-min-width); - margin-top: 0 !important; /* Fix full screen mode */ - - padding-bottom: var(--zen-element-separation) !important; - - border: none; - order: 0 !important; - - display: flex; - - & toolbarspring { display: none; } - } - - .titlebar-spacer[type='pre-tabs'], - .titlebar-spacer[type='post-tabs'] { - display: none; - } - - :root[zen-single-toolbar='true']:not([customizing]) { - #zen-appcontent-navbar-container { - display: flex; - -moz-window-dragging: drag; - min-height: var(--zen-element-separation); - height: var(--zen-element-separation); - - & #PersonalToolbar { - width: -moz-available; - } - - /* We enable this trick IF we follow any of theses conditions: - * - We are on a Mac - * - We are on a Linux with reversed CSD - * - If we are not in any of the above, we can still enable it if the user has bookmarks toolbar enabled - */ - &:has(#PersonalToolbar[collapsed='false']) { -%include vertical-tabs-topbar.inc.css - } - - &[should-hide='true'] { -%include vertical-tabs-topbar.inc.css - } - - :root[zen-window-buttons-reversed='true'] & { - &:has(#PersonalToolbar[collapsed="true"]) { - display: none; - } - } - } - } - - #TabsToolbar-customization-target { - position: relative; - max-width: 100%; - gap: 0; - &::after { - content: ''; - display: block; - height: 1px; - - margin: 0 auto; - width: 80%; - left: 50%; - transform: translateX(-50%); - position: absolute; - bottom: calc(-1 * var(--zen-toolbox-padding)); - } - - @media (-moz-bool-pref: 'zen.view.show-bottom-border') { - &::after { - background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1)); - } - } - - & > * { - border-top-width: 0 !important; - } - } - - #vertical-tabs-newtab-button { - &:hover, - &:not(:is(:hover, :active)) .toolbarbutton-icon { - background: transparent !important; - } - } - - #tabbrowser-tabs { - margin-inline-start: 0 !important; - padding-inline-start: 0 !important; - - --tab-inner-inline-margin: 0; - - position: relative; - border-bottom: 0px solid transparent !important; - - --tab-block-margin: 2px; - --tab-selected-bgcolor: light-dark(rgba(255,255,255,.8), rgba(255,255,255,.25)); - grid-gap: 0 !important; - - &[overflow]::after, - #vertical-tabs-newtab-button { - /* Hide separator they give us, eww */ - display: none !important; - } - - & .tabbrowser-tab { - animation: none; - transition: none; - &[fadein='true']:not([zen-essential='true']) { - #tabbrowser-tabs[zen-workspace-animation='previous'] & { - animation: zen-slide-in-reverse 0.2s ease-in-out; - } - - #tabbrowser-tabs[zen-workspace-animation='next'] & { - animation: zen-slide-in 0.2s ease-in-out; - } - - &[pinned] { - animation-delay: .03s !important; - } - } - - max-width: unset; - padding: 0 !important; - - position: relative; - border-radius: var(--border-radius-medium); - - & .tab-background { - overflow: hidden; - - & .tab-context-line { - margin: 0 0px !important; - width: 3px !important; - } - } - - &[selected] .tab-background { - backdrop-filter: blur(10px); - } - - @media (-moz-bool-pref: 'zen.tabs.dim-pending') { - &[pending='true'] .tab-icon-image { - opacity: 0.5; - } - } - - /* We have a tab inside a tab, this means, it's a glance tab */ - & .tabbrowser-tab { - border-radius: 5px; - pointer-events: none; - margin: 0; - --toolbarbutton-inner-padding: 0; - - & .tab-background { - background: transparent; - box-shadow: none !important; - } - & label { display: none !important; } - & .tab-close-button, - & .tab-reset-button { - display: none !important; - } - - & .tab-icon-image { - --toolbarbutton-inner-padding: 0 !important; - } - } - - /* On essentials, glance tabs are floating */ - &[zen-essential='true'] .tabbrowser-tab { - position: absolute; - top: 3px; - right: 5px; - --tab-collapsed-width: 15px; - --tab-min-height: 15px; - width: var(--tab-collapsed-width) !important; - z-index: 1; - pointer-events: none; - } - } - } - - #zen-sidebar-icons-wrapper { - background: transparent; - gap: 5px; - align-items: center; - - padding-top: var(--zen-element-separation); - - & > toolbarbutton:not(#zen-workspaces-button) { - padding: 0 !important; - } - } - - #newtab-button-container { - display: none !important; - } - - #tabbrowser-arrowscrollbox { - &::part(scrollbox) { - gap: 0px !important; - } - - &::part(overflow-start-indicator), - &::part(overflow-end-indicator) { - display: none !important; - } - } - - #vertical-pinned-tabs-container { - padding-inline-end: 0 !important; - display: flex !important; - flex-direction: column; - - & .tabbrowser-tab:not(:hover) .tab-background:not([selected]):not([multiselected]) { - background: transparent !important; - } - - & .tabbrowser-tab .tab-content { - display: flex; - align-items: center; - justify-content: center; - } - - .tabbrowser-tab[zen-glance-tab='true'] { - width: fit-content !important; - } - } - - /* Mark: toolbox as expanded */ - #navigator-toolbox[zen-sidebar-expanded='true'] { - --zen-toolbox-min-width: fit-content; - --tab-icon-end-margin: 8.5px; - padding: var(--zen-toolbox-padding); - padding-left: 0; - padding-top: 0; - z-index: 1; - - & #titlebar { - min-width: 150px; - } - - & #tabbrowser-arrowscrollbox-periphery { - margin-inline: var(--tab-block-margin); - } - - & #nav-bar { - padding-right: 0; - - :root[zen-single-toolbar='true'] & { - margin-left: var(--zen-toolbox-padding); - width: calc(100% - var(--zen-toolbox-padding)); - & .urlbar-input-container { - padding-left: 4px; - padding-right: 4px; - } - - :root[zen-right-side='true'] & { - margin-left: 0; - margin-right: var(--zen-toolbox-padding); - } - } - } - - & #nav-bar { - margin-top: 0; - } - - & #zen-workspaces-button[as-button='true'] { - width: calc(100% - 10px) !important; - } - - & #zen-current-workspace-indicator-icon[no-icon='true'] { - display: none; - } - - & #zen-workspaces-button { - margin-left: 2px; - margin-right: 2px; - - & .zen-workspace-sidebar-icon[no-icon='true'] { - display: none; - } - } - - & #vertical-pinned-tabs-container:has(tab:not([hidden])) { - position: relative; - - & .tabbrowser-tab { - width: 100%; - } - } - - & #zen-sidebar-icons-wrapper { - display: flex; - /* Make sure the icons take most of the space, smartly */ - flex-direction: row; - justify-content: space-between; - - width: 100%; - position: relative; - } - - & #zen-essentials-container { - --tab-min-height: 42px; - } - - /* Mark: Fix separator paddings */ - &[zen-right-side='true'] { - padding-left: 0; - } - - &:not([zen-right-side='true']):not([zen-user-hover='true']) { - padding-right: 0; - & #titlebar { - padding-left: var(--zen-toolbox-padding); - } - } - - & #TabsToolbar-customization-target { - &::after { - width: 100%; - bottom: calc(-0.5 * var(--zen-toolbox-padding)); - } - - & > *:not(tabs):not(#search-container):not(#zen-workspaces-button), - & #tabbrowser-arrowscrollbox-periphery > toolbarbutton { - width: 100% !important; - border-radius: var(--tab-border-radius) !important; - - padding-left: var(--toolbarbutton-inner-padding) !important; - padding-right: var(--toolbarbutton-inner-padding) !important; - - & label { - display: flex; - width: 100%; - } - - & image { - height: 16px; - width: 16px; - padding: 0 !important; - } - - &:is([open], [checked]) { - background: var(--toolbarbutton-active-background) !important; - - & image, - label { - background: transparent !important; - } - } - - &:hover { - background: var(--toolbarbutton-hover-background) !important; - - & image, - label { - background: transparent !important; - } - } - } - } - - & #tabbrowser-tabs { - --tab-inline-padding: 8px; - & .tabbrowser-tab { - - & .tab-label-container { - display: flex; - } - - & .tab-background { - @media not (prefers-color-scheme: dark) { - &:is([selected], [multiselected]) { - box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.15); - } - } - margin-inline: var(--tab-block-margin); - width: -moz-available; - } - - &:is(:hover, [visuallyselected]) .tab-close-button { - display: block; - --tab-inline-padding: 0; /* Avoid weird padding */ - margin-inline-end: 0 !important; - } - - .tab-throbber, - .tab-icon-pending, - .tab-icon-image, - .tab-sharing-icon-overlay, - .tab-icon-overlay { - margin-inline-end: var(--toolbarbutton-inner-padding) !important; - margin-inline-start: calc(var(--toolbarbutton-inner-padding) / 4) !important; - } - } - } - } - - /* Mark: toolbox as collapsed */ - #navigator-toolbox:not([zen-sidebar-expanded='true']) { - --tab-min-width: 36px !important; - /* Important: When changin this value, make sure expand on hover doesn't break! */ - --zen-toolbox-padding: calc(var(--zen-element-separation) / 2 + 1px); - --zen-toolbox-max-width: calc(var(--tab-min-width) + var(--zen-toolbox-padding) * 2); - max-width: var(--zen-toolbox-max-width) !important; - min-width: var(--zen-toolbox-max-width) !important; - & #zen-current-workspace-indicator-name, - & .toolbarbutton-text { - display: none !important; - } - & #zen-current-workspace-indicator { - padding-left: 0; - padding-right: 0; - display: flex; - align-items: center; - justify-content: center; - opacity: .4; - } - & #zen-essentials-container { - justify-content: center; - } - & #vertical-tabs-newtab-button { - padding: 0 !important; - background: transparent !important; - } - :root[customizing] & #zen-sidebar-icons-wrapper { - min-width: unset !important; - } - & #zen-sidebar-icons-wrapper { - display: flex; - flex-direction: column; - padding-top: var(--zen-element-separation); - align-items: center; - } - :root:has(&) #zen-sidebar-splitter { - display: none !important; - } - & #tabbrowser-arrowscrollbox-periphery { - & > toolbarbutton { - margin: 0 auto !important; - padding: 0 !important; - } - &::before { - width: 90% !important; - } - } - & #EssentialsToolbar { - display: none !important; - } - & #essentials-accordion-header { - display: none !important; - } - & #vertical-pinned-tabs-container:has(tab:not([hidden])) { - position: relative; - & .tabbrowser-tab { - max-width: var(--tab-min-width); - } - } - & #TabsToolbar-customization-target { - padding-bottom: var(--zen-toolbox-padding); - &::after { - bottom: -1px !important; - } - } - & #tabbrowser-tabs { - margin-top: -2px; - & .tabbrowser-tab { - margin: 0 auto; - & .tab-background { - margin-inline: auto !important; - &:is([selected], [multiselected]) { - box-shadow: 0 0 1px 1px rgba(0,0,0,.1); - - @media not (prefers-color-scheme: dark) { - box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.12) !important; - } - } - } - & .tab-reset-button { - display: none !important; - } - & .tab-content { - display: flex; - align-content: center; - justify-content: center; - padding: 0 !important; - & .tab-label-container { - display: none !important; - } - & .tab-icon-image, - & .tab-icon-pending { - margin-inline-end: 0 !important; - } - /* Hide glances */ - & .tabbrowser-tab { - display: none !important; - } - } - } - @media (-moz-bool-pref: 'zen.view.sidebar-collapsed.hide-mute-button') { - & .tab-icon-overlay:is([soundplaying], [muted]):not([selected]) { - display: none !important; - :is( - :root[uidensity='compact'], - #tabbrowser-tabs[secondarytext-unsupported], - :root:not([uidensity='compact']) #tabbrowser-tabs:not([secondarytext-unsupported]) .tabbrowser-tab:hover - ) - .tab-icon-stack[indicator-replaces-favicon] - > :not(&), - :root:not([uidensity='compact']) - #tabbrowser-tabs:not([secondarytext-unsupported]) - .tabbrowser-tab:not(:hover) - &[indicator-replaces-favicon] { - opacity: 1 !important; - } - } - } - & .tab-throbber, - & .tab-icon-pending, - & .tab-icon-image, - & .tab-sharing-icon-overlay, - & .tab-icon-overlay { - margin-inline-end: 0 !important; - } - } - & #zen-workspaces-button { - flex-direction: column; - &:not([as-button='true']) { - & toolbarbutton { - &[active='true']::after { - bottom: 50% !important; - transform: translateY(50%) !important; - } - } - } - } - } - - /* Mark: Separator styling */ - #zen-sidebar-splitter { - opacity: 0; - width: var(--zen-toolbox-padding); - height: 100%; - transition: opacity 0.2s ease-in-out; - background: var(--zen-colors-border); - appearance: none; - - &:hover { - opacity: 1; - } - } - - /* Mark: Move sidebar to the right */ - :root[zen-right-side='true'] { - & #navigator-toolbox { - order: 3 !important; - } - - & #zen-sidebar-splitter { - order: 2 !important; - } - } - - /* Mark: Override the default tab close button */ - #tabbrowser-tabs { - & .tabbrowser-tab { - &[pinned] .tab-close-button { - display: none !important; - } - - &[pinned]:not([zen-essential]):hover .tab-reset-button, - &[pinned][visuallyselected]:not([zen-essential]) .tab-reset-button { - display: block; - } - - &[zen-essential] .tab-reset-button { - display: none; - } - - &:not([pinned]) .tab-reset-button { - display: none; - } - - &[selected] .tab-background { - border-color: transparent; - } - } - } - - .tab-reset-button { - display: none; - -moz-context-properties: fill, fill-opacity; - border-radius: var(--tab-border-radius); - color: inherit; - fill: currentColor; - padding: 6px; - width: 24px; - height: 24px; - outline: var(--toolbarbutton-outline); - - &:hover { - outline-color: var(--toolbarbutton-hover-outline-color); - } - - &:hover:active { - outline-color: var(--toolbarbutton-active-outline-color); - } - } - - .reset-icon { - appearance: none; - - } - - @media not (forced-colors) { - .tab-reset-button:hover { - background-color: color-mix(in srgb, currentColor 10%, transparent); - } - - .tab-reset-button:hover:active { - background-color: color-mix(in srgb, currentColor 20%, transparent); - } - } - - .tab-reset-button> .button-icon, - .tab-reset-button > .button-box > .button-icon, - .tab-reset-button > .toolbarbutton-icon { - margin: 0; - } - - .tab-reset-button > .button-box > .button-text, - .tab-reset-button > .toolbarbutton-text { - display: none; - } - - - /* Customization mode */ - /*:root[customizing] #TabsToolbar > *:not(#zen-sidebar-icons-wrapper) { - overflow: hidden; - max-width: 0 !important; - margin-right: var(--zen-element-separation); - padding: 0 !important; - opacity: 0; - display: none; - }*/ - - :root[customizing] #TabsToolbar > *, - :root[customizing] #TabsToolbar-customization-target { - min-width: unset !important; - } - - /* Mark: Sidebar top buttons */ - #zen-sidebar-top-buttons { - order: -1; - - min-width: unset !important; - --toolbarbutton-inner-padding: calc(var(--zen-toolbar-button-inner-padding) - 2px) !important; - - & #zen-sidebar-top-buttons-customization-target { - height: 100%; - align-items: center; - padding-inline-start: var(--zen-toolbox-padding); - - #nav-bar:has(&) & { - padding-inline-start: var(--toolbarbutton-outer-padding); + & #nav-bar { + padding-right: 0; + + :root[zen-single-toolbar='true'] & { + margin-left: var(--zen-toolbox-padding); + width: calc(100% - var(--zen-toolbox-padding)); + & .urlbar-input-container { + padding-left: 4px; + padding-right: 4px; } :root[zen-right-side='true'] & { - padding-inline-start: 0; - padding-inline-end: var(--zen-toolbox-padding); - } - - & toolbarbutton { - height: calc(2 * var(--toolbarbutton-inner-padding) + 16px); - padding: 0 var(--toolbarbutton-outer-padding) !important; - } - } - - & .zen-sidebar-action-button { - padding: 0 !important; - - & label { - display: none !important; + margin-left: 0; + margin-right: var(--zen-toolbox-padding); } } } - #tabs-newtab-button { + & #nav-bar { + margin-top: 0; + } + + & #zen-workspaces-button[as-button='true'] { + width: calc(100% - 10px) !important; + } + + & #zen-current-workspace-indicator-icon[no-icon='true'] { display: none; } - @media (-moz-bool-pref: 'zen.tabs.show-newtab-vertical') { - #tabs-newtab-button { - display: flex !important; - & .toolbarbutton-text { - align-items: center; - padding-top: 0; - } + & #zen-workspaces-button { + margin-left: 2px; + margin-right: 2px; + + & .zen-workspace-sidebar-icon[no-icon='true'] { + display: none; + } + } + + & #vertical-pinned-tabs-container:has(tab:not([hidden])) { + position: relative; + + & .tabbrowser-tab { + width: 100%; + } + } + + & #zen-sidebar-icons-wrapper { + display: flex; + /* Make sure the icons take most of the space, smartly */ + flex-direction: row; + justify-content: space-between; + + width: 100%; + position: relative; + } + + & #zen-essentials-container { + --tab-min-height: 42px; + } + + /* Mark: Fix separator paddings */ + &[zen-right-side='true'] { + padding-left: 0; + } + + &:not([zen-right-side='true']):not([zen-user-hover='true']) { + padding-right: 0; + & #titlebar { + padding-left: var(--zen-toolbox-padding); + } + } + + & #TabsToolbar-customization-target { + &::after { + width: 100%; + bottom: calc(-0.5 * var(--zen-toolbox-padding)); } - #tabbrowser-arrowscrollbox-periphery { - @media not (prefers-color-scheme: dark) { - --zen-colors-border: var(--zen-colors-tertiary); + & > *:not(tabs):not(#search-container):not(#zen-workspaces-button), + & #tabbrowser-arrowscrollbox-periphery > toolbarbutton { + width: 100% !important; + border-radius: var(--tab-border-radius) !important; + + padding-left: var(--toolbarbutton-inner-padding) !important; + padding-right: var(--toolbarbutton-inner-padding) !important; + + & label { + display: flex; + width: 100%; } - @media (-moz-bool-pref: 'zen.view.show-newtab-button-top') { - order: -1; + & image { + height: 16px; + width: 16px; + padding: 0 !important; } - @media (-moz-bool-pref: 'zen.view.show-newtab-button-border-top') and (not (-moz-bool-pref: 'zen.view.show-newtab-button-top')) { - #tabbrowser-arrowscrollbox:has(tab:not([hidden])) & { - margin-top: 15px; - position: relative; - &::before { - content: ''; - display: block; - height: 1px; - background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1)); - width: 98%; - position: absolute; - top: -8px; - left: 50%; - transform: translateX(-50%); + &:is([open], [checked]) { + background: var(--toolbarbutton-active-background) !important; + + & image, + label { + background: transparent !important; + } + } + + &:hover { + background: var(--toolbarbutton-hover-background) !important; + + & image, + label { + background: transparent !important; } } } + } + + & #tabbrowser-tabs { + --tab-inline-padding: 8px; + & .tabbrowser-tab { + + & .tab-label-container { + display: flex; + } + + & .tab-background { + @media not (prefers-color-scheme: dark) { + &:is([selected], [multiselected]) { + box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.15); + } + } + margin-inline: var(--tab-block-margin); + width: -moz-available; + } + + &:is(:hover, [visuallyselected]) .tab-close-button { + display: block; + --tab-inline-padding: 0; /* Avoid weird padding */ + margin-inline-end: 0 !important; + } + + .tab-throbber, + .tab-icon-pending, + .tab-icon-image, + .tab-sharing-icon-overlay, + .tab-icon-overlay { + margin-inline-end: var(--toolbarbutton-inner-padding) !important; + margin-inline-start: calc(var(--toolbarbutton-inner-padding) / 4) !important; + } } } +} + +/* Mark: toolbox as collapsed */ +#navigator-toolbox:not([zen-sidebar-expanded='true']) { + --tab-min-width: 36px !important; + /* Important: When changin this value, make sure expand on hover doesn't break! */ + --zen-toolbox-padding: calc(var(--zen-element-separation) / 2 + 1px); + --zen-toolbox-max-width: calc(var(--tab-min-width) + var(--zen-toolbox-padding) * 2); + max-width: var(--zen-toolbox-max-width) !important; + min-width: var(--zen-toolbox-max-width) !important; + & #zen-current-workspace-indicator-name, + & .toolbarbutton-text { + display: none !important; + } + & #zen-current-workspace-indicator { + padding-left: 0; + padding-right: 0; + display: flex; + align-items: center; + justify-content: center; + opacity: .4; + } + & #zen-essentials-container { + justify-content: center; + } + & #vertical-tabs-newtab-button { + padding: 0 !important; + background: transparent !important; + } + :root[customizing] & #zen-sidebar-icons-wrapper { + min-width: unset !important; + } + & #zen-sidebar-icons-wrapper { + display: flex; + flex-direction: column; + padding-top: var(--zen-element-separation); + align-items: center; + } + :root:has(&) #zen-sidebar-splitter { + display: none !important; + } + & #tabbrowser-arrowscrollbox-periphery { + & > toolbarbutton { + margin: 0 auto !important; + padding: 0 !important; + } + &::before { + width: 90% !important; + } + } + & #EssentialsToolbar { + display: none !important; + } + & #essentials-accordion-header { + display: none !important; + } + & #vertical-pinned-tabs-container:has(tab:not([hidden])) { + position: relative; + & .tabbrowser-tab { + max-width: var(--tab-min-width); + } + } + & #TabsToolbar-customization-target { + padding-bottom: var(--zen-toolbox-padding); + &::after { + bottom: -1px !important; + } + } + & #tabbrowser-tabs { + margin-top: -2px; + & .tabbrowser-tab { + margin: 0 auto; + & .tab-background { + margin-inline: auto !important; + &:is([selected], [multiselected]) { + box-shadow: 0 0 1px 1px rgba(0,0,0,.1); + + @media not (prefers-color-scheme: dark) { + box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.12) !important; + } + } + } + & .tab-reset-button { + display: none !important; + } + & .tab-content { + display: flex; + align-content: center; + justify-content: center; + padding: 0 !important; + & .tab-label-container { + display: none !important; + } + & .tab-icon-image, + & .tab-icon-pending { + margin-inline-end: 0 !important; + } + /* Hide glances */ + & .tabbrowser-tab { + display: none !important; + } + } + } + @media (-moz-bool-pref: 'zen.view.sidebar-collapsed.hide-mute-button') { + & .tab-icon-overlay:is([soundplaying], [muted]):not([selected]) { + display: none !important; + :is( + :root[uidensity='compact'], + #tabbrowser-tabs[secondarytext-unsupported], + :root:not([uidensity='compact']) #tabbrowser-tabs:not([secondarytext-unsupported]) .tabbrowser-tab:hover + ) + .tab-icon-stack[indicator-replaces-favicon] + > :not(&), + :root:not([uidensity='compact']) + #tabbrowser-tabs:not([secondarytext-unsupported]) + .tabbrowser-tab:not(:hover) + &[indicator-replaces-favicon] { + opacity: 1 !important; + } + } + } + & .tab-throbber, + & .tab-icon-pending, + & .tab-icon-image, + & .tab-sharing-icon-overlay, + & .tab-icon-overlay { + margin-inline-end: 0 !important; + } + } + & #zen-workspaces-button { + flex-direction: column; + &:not([as-button='true']) { + & toolbarbutton { + &[active='true']::after { + bottom: 50% !important; + transform: translateY(50%) !important; + } + } + } + } +} + +/* Mark: Separator styling */ +#zen-sidebar-splitter { + opacity: 0; + width: var(--zen-toolbox-padding); + height: 100%; + transition: opacity 0.2s ease-in-out; + background: var(--zen-colors-border); + appearance: none; + + &:hover { + opacity: 1; + } +} + +/* Mark: Move sidebar to the right */ +:root[zen-right-side='true'] { + & #navigator-toolbox { + order: 3 !important; + } + + & #zen-sidebar-splitter { + order: 2 !important; + } +} + +/* Mark: Override the default tab close button */ +#tabbrowser-tabs { + & .tabbrowser-tab { + &[pinned] .tab-close-button { + display: none !important; + } + + &[pinned]:not([zen-essential]):hover .tab-reset-button, + &[pinned][visuallyselected]:not([zen-essential]) .tab-reset-button { + display: block; + } + + &[zen-essential] .tab-reset-button { + display: none; + } + + &:not([pinned]) .tab-reset-button { + display: none; + } + + &[selected] .tab-background { + border-color: transparent; + } + } +} + +.tab-reset-button { + display: none; + -moz-context-properties: fill, fill-opacity; + border-radius: var(--tab-border-radius); + color: inherit; + fill: currentColor; + padding: 6px; + width: 24px; + height: 24px; + outline: var(--toolbarbutton-outline); + + &:hover { + outline-color: var(--toolbarbutton-hover-outline-color); + } + + &:hover:active { + outline-color: var(--toolbarbutton-active-outline-color); + } +} + +.reset-icon { + appearance: none; + +} + +@media not (forced-colors) { + .tab-reset-button:hover { + background-color: color-mix(in srgb, currentColor 10%, transparent); + } + + .tab-reset-button:hover:active { + background-color: color-mix(in srgb, currentColor 20%, transparent); + } +} + +.tab-reset-button> .button-icon, +.tab-reset-button > .button-box > .button-icon, +.tab-reset-button > .toolbarbutton-icon { + margin: 0; +} + +.tab-reset-button > .button-box > .button-text, +.tab-reset-button > .toolbarbutton-text { + display: none; +} + + +/* Customization mode */ +/*:root[customizing] #TabsToolbar > *:not(#zen-sidebar-icons-wrapper) { + overflow: hidden; + max-width: 0 !important; + margin-right: var(--zen-element-separation); + padding: 0 !important; + opacity: 0; + display: none; +}*/ + +:root[customizing] #TabsToolbar > *, +:root[customizing] #TabsToolbar-customization-target { + min-width: unset !important; +} + +/* Mark: Sidebar top buttons */ +#zen-sidebar-top-buttons { + order: -1; + + min-width: unset !important; + --toolbarbutton-inner-padding: calc(var(--zen-toolbar-button-inner-padding) - 2px) !important; + + & #zen-sidebar-top-buttons-customization-target { + height: 100%; + align-items: center; + padding-inline-start: var(--zen-toolbox-padding); + + #nav-bar:has(&) & { + padding-inline-start: var(--toolbarbutton-outer-padding); + } + + :root[zen-right-side='true'] & { + padding-inline-start: 0; + padding-inline-end: var(--zen-toolbox-padding); + } + + & toolbarbutton:not(.titlebar-button) { + height: calc(2 * var(--toolbarbutton-inner-padding) + 16px); + padding: 0 var(--toolbarbutton-outer-padding) !important; + } + } + + & .zen-sidebar-action-button { + padding: 0 !important; + + & label { + display: none !important; + } + } +} + +#tabs-newtab-button { + display: none; +} + +@media (-moz-bool-pref: 'zen.tabs.show-newtab-vertical') { + #tabs-newtab-button { + display: flex !important; + & .toolbarbutton-text { + align-items: center; + padding-top: 0; + } + } + + #tabbrowser-arrowscrollbox-periphery { + @media not (prefers-color-scheme: dark) { + --zen-colors-border: var(--zen-colors-tertiary); + } + + @media (-moz-bool-pref: 'zen.view.show-newtab-button-top') { + order: -1; + } + + @media (-moz-bool-pref: 'zen.view.show-newtab-button-border-top') and (not (-moz-bool-pref: 'zen.view.show-newtab-button-top')) { + #tabbrowser-arrowscrollbox:has(tab:not([hidden])) & { + margin-top: 15px; + position: relative; + &::before { + content: ''; + display: block; + height: 1px; + background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1)); + width: 98%; + position: absolute; + top: -8px; + left: 50%; + transform: translateX(-50%); + } + } + } + } +} /* Mark: Essentials Toolbar */ @@ -869,7 +884,7 @@ &:not([selected]) .tab-background { background: light-dark(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1)); - box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1); + box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.07), rgba(0, 0, 0, 0.1)); } backdrop-filter: blur(10px);