mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-06 11:28:28 +00:00
refactor: update toolbar and sidebar styles for improved layout and consistency
This commit is contained in:
@@ -262,14 +262,13 @@ var gZenVerticalTabsManager = {
|
|||||||
|
|
||||||
if (isSingleToolbar) {
|
if (isSingleToolbar) {
|
||||||
this._navbarParent = navBar.parentElement;
|
this._navbarParent = navBar.parentElement;
|
||||||
let elements = document.querySelectorAll('#nav-bar-customization-target > *:is(toolbarbutton, #stop-reload-button)');
|
let elements = document.querySelectorAll('#nav-bar-customization-target > :is([cui-areatype="toolbar"], .chromeclass-toolbar-additional):not(#urlbar-container)');
|
||||||
elements = Array.from(elements);
|
elements = Array.from(elements);
|
||||||
// Add separator if it doesn't exist
|
// Add separator if it doesn't exist
|
||||||
if (!buttonsTarget.contains(this._topButtonsSeparatorElement)) {
|
if (!buttonsTarget.contains(this._topButtonsSeparatorElement)) {
|
||||||
buttonsTarget.append(this._topButtonsSeparatorElement);
|
buttonsTarget.append(this._topButtonsSeparatorElement);
|
||||||
}
|
}
|
||||||
for (const button of elements) {
|
for (const button of elements) {
|
||||||
button.setAttribute('zen-single-toolbar', 'true');
|
|
||||||
buttonsTarget.append(button);
|
buttonsTarget.append(button);
|
||||||
}
|
}
|
||||||
buttonsTarget.prepend(document.getElementById('unified-extensions-button'));
|
buttonsTarget.prepend(document.getElementById('unified-extensions-button'));
|
||||||
@@ -290,13 +289,10 @@ var gZenVerticalTabsManager = {
|
|||||||
this._hasSetSingleToolbar = false;
|
this._hasSetSingleToolbar = false;
|
||||||
// Do the opposite
|
// Do the opposite
|
||||||
this._navbarParent.prepend(navBar);
|
this._navbarParent.prepend(navBar);
|
||||||
const elements = document.querySelectorAll('#zen-sidebar-top-buttons-customization-target > *:is(toolbarbutton, #stop-reload-button)');
|
const elements = document.querySelectorAll('#zen-sidebar-top-buttons-customization-target > :is([cui-areatype="toolbar"], .chromeclass-toolbar-additional)');
|
||||||
for (const button of elements) {
|
for (const button of elements) {
|
||||||
if (button.hasAttribute('zen-single-toolbar')) {
|
|
||||||
button.removeAttribute('zen-single-toolbar');
|
|
||||||
document.getElementById('nav-bar-customization-target').append(button);
|
document.getElementById('nav-bar-customization-target').append(button);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
document.documentElement.removeAttribute("zen-single-toolbar");
|
document.documentElement.removeAttribute("zen-single-toolbar");
|
||||||
navBar.appendChild(document.getElementById('PanelUI-button'));
|
navBar.appendChild(document.getElementById('PanelUI-button'));
|
||||||
this._toolbarOriginalParent.prepend(navBar);
|
this._toolbarOriginalParent.prepend(navBar);
|
||||||
|
@@ -9,6 +9,11 @@
|
|||||||
--inactive-titlebar-opacity: 1;
|
--inactive-titlebar-opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#nav-bar,
|
||||||
|
#navigator-toolbox {
|
||||||
|
position: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
:root:is([inDOMFullscreen='true'], [chromehidden~='location'], [chromehidden~='toolbar']) {
|
:root:is([inDOMFullscreen='true'], [chromehidden~='location'], [chromehidden~='toolbar']) {
|
||||||
#navigator-toolbox,
|
#navigator-toolbox,
|
||||||
#zen-sidebar-splitter {
|
#zen-sidebar-splitter {
|
||||||
|
@@ -90,7 +90,7 @@
|
|||||||
#navigator-toolbox:has(*[open='true']:not(tab):not(.zen-compact-mode-ignore)) {
|
#navigator-toolbox:has(*[open='true']:not(tab):not(.zen-compact-mode-ignore)) {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
||||||
transform: translateX(calc(100% - var(--zen-element-separation)));
|
transform: translateX(calc(100% - var(--zen-element-separation) - 1px));
|
||||||
:root[zen-right-side='true'] & {
|
:root[zen-right-side='true'] & {
|
||||||
transform: translateX(calc(-100% + var(--zen-element-separation) + 1px));
|
transform: translateX(calc(-100% + var(--zen-element-separation) + 1px));
|
||||||
}
|
}
|
||||||
|
@@ -170,7 +170,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#zen-sidebar-web-panel-wrapper {
|
#zen-sidebar-web-panel-wrapper {
|
||||||
margin: 0 calc(var(--zen-element-separation) / 2) var(--zen-element-separation) var(--zen-element-separation);
|
margin: 0 calc(var(--zen-element-separation) / 2) 0 var(--zen-element-separation);
|
||||||
}
|
}
|
||||||
|
|
||||||
#zen-sidebar-web-panel[pinned='true'] {
|
#zen-sidebar-web-panel[pinned='true'] {
|
||||||
|
@@ -119,8 +119,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox {
|
#navigator-toolbox {
|
||||||
--border-radius-medium: 8px;
|
--border-radius-medium: 10px;
|
||||||
--tab-border-radius: var(--border-radius-medium);
|
--tab-border-radius: 10px;
|
||||||
--zen-toolbox-min-width: 1px;
|
--zen-toolbox-min-width: 1px;
|
||||||
|
|
||||||
--tab-hover-background-color: color-mix(in srgb, var(--toolbarbutton-hover-background) 50%, transparent 50%);
|
--tab-hover-background-color: color-mix(in srgb, var(--toolbarbutton-hover-background) 50%, transparent 50%);
|
||||||
@@ -888,12 +888,14 @@
|
|||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
border-radius: var(--border-radius-medium);
|
border-radius: var(--border-radius-medium);
|
||||||
|
|
||||||
&:not([selected]) .tab-background {
|
&[selected] .tab-background {
|
||||||
background: light-dark(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
|
|
||||||
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.07), 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));
|
||||||
|
outline: 1px solid light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.4)) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
backdrop-filter: blur(10px);
|
&:not([selected]) .tab-background {
|
||||||
|
background: light-dark(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
|
||||||
|
}
|
||||||
|
|
||||||
& .tab-content {
|
& .tab-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@@ -133,6 +133,8 @@
|
|||||||
|
|
||||||
--toolbar-field-background-color: var(--zen-colors-input-bg) !important;
|
--toolbar-field-background-color: var(--zen-colors-input-bg) !important;
|
||||||
--arrowpanel-background: var(--zen-dialog-background) !important;
|
--arrowpanel-background: var(--zen-dialog-background) !important;
|
||||||
|
|
||||||
|
--tab-selected-shadow: 0 0 1px 1px rgba(0,0,0,.1) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
min-width: 45%;
|
min-width: 45%;
|
||||||
--urlbar-container-height: 55px !important;
|
--urlbar-container-height: 55px !important;
|
||||||
--urlbar-margin-inline: 10px !important;
|
--urlbar-margin-inline: 10px !important;
|
||||||
position: fixed;
|
position: absolute;
|
||||||
|
|
||||||
top: calc(var(--zen-toolbar-height) * 4);
|
top: calc(var(--zen-toolbar-height) * 4);
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#urlbar:not([focused='true']):not([breakout-extend="true"]) > #urlbar-background {
|
#urlbar:not([focused='true']):not([breakout-extend="true"]) > #urlbar-background {
|
||||||
background: light-dark(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)) !important;
|
background: light-dark(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1)) !important;
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user