mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-13 21:43:52 +02:00
272 lines
6 KiB
CSS
272 lines
6 KiB
CSS
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
@namespace html 'http://www.w3.org/1999/xhtml';
|
|
@namespace xul 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';
|
|
|
|
#zen-workspaces-button {
|
|
justify-content: center;
|
|
align-items: center;
|
|
display: flex;
|
|
font-size: x-small;
|
|
padding: 0 3px;
|
|
margin: 0;
|
|
appearance: auto;
|
|
|
|
position: relative;
|
|
|
|
&[dont-show='true'] {
|
|
display: none !important;
|
|
}
|
|
|
|
--toolbarbutton-hover-background: transparent !important;
|
|
border-radius: var(--zen-button-border-radius) !important;
|
|
background: transparent;
|
|
appearance: unset !important;
|
|
height: fit-content;
|
|
gap: 3px;
|
|
|
|
container-type: inline-size;
|
|
width: 100%;
|
|
|
|
& toolbarbutton {
|
|
margin: 0;
|
|
width: 25px;
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 0 !important;
|
|
align-items: center;
|
|
position: relative;
|
|
|
|
& .zen-workspace-icon[no-icon='true'] {
|
|
width: 6px;
|
|
height: 6px;
|
|
background: light-dark(rgba(0, 0, 0, 0.4), rgba(255, 255, 255, 0.4));
|
|
border-radius: 50%;
|
|
}
|
|
|
|
filter: grayscale(1);
|
|
opacity: 0.5;
|
|
transition:
|
|
filter 0.2s,
|
|
opacity 0.2s,
|
|
width 0.1s;
|
|
|
|
&[active='true'],
|
|
&:hover {
|
|
filter: grayscale(0);
|
|
opacity: 1;
|
|
}
|
|
|
|
&:hover {
|
|
background-color: var(--zen-toolbar-element-bg);
|
|
}
|
|
}
|
|
|
|
&[icons-overflow] {
|
|
gap: 0 !important;
|
|
|
|
& toolbarbutton {
|
|
margin: 0;
|
|
}
|
|
|
|
/* Inlcude separately since ther'es a bug in the
|
|
* rendering of XUL in firefox */
|
|
& toolbarbutton:not([active='true']) {
|
|
%include overflow-icons.inc.css
|
|
}
|
|
|
|
&:has(toolbarbutton:hover) toolbarbutton[active='true'] {
|
|
%include overflow-icons.inc.css
|
|
}
|
|
}
|
|
}
|
|
|
|
#zen-workspaces-button .zen-workspace-sidebar-wrapper {
|
|
position: absolute;
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
pointer-events: none;
|
|
}
|
|
|
|
#zen-workspaces-button .zen-workspace-sidebar-name {
|
|
margin-left: 0.2rem;
|
|
display: none;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
font-size: 13px;
|
|
}
|
|
|
|
/** Keep these selectors in sync with the ones in vertical-tabs.css */
|
|
#navigator-toolbox {
|
|
& #zen-workspaces-button .zen-workspace-sidebar-name {
|
|
display: block;
|
|
}
|
|
|
|
& #zen-workspaces-button .zen-workspace-sidebar-icon {
|
|
margin-inline-end: 5px;
|
|
}
|
|
|
|
& #zen-workspaces-button {
|
|
overflow: hidden;
|
|
display: flex;
|
|
gap: 0.5ch;
|
|
overflow-x: auto;
|
|
scrollbar-width: none;
|
|
scroll-behavior: smooth;
|
|
}
|
|
}
|
|
|
|
/* Mark workspaces indicator */
|
|
.zen-current-workspace-indicator {
|
|
padding: calc(4px + var(--tab-inline-padding) + var(--zen-toolbox-padding));
|
|
font-weight: 600;
|
|
position: relative;
|
|
max-height: var(--zen-workspace-indicator-height);
|
|
min-height: var(--zen-workspace-indicator-height);
|
|
gap: 10px;
|
|
align-items: center;
|
|
flex-direction: row !important;
|
|
max-width: 100%;
|
|
width: 100%;
|
|
font-size: small;
|
|
padding-right: 10px;
|
|
|
|
&::before {
|
|
border-radius: var(--border-radius-medium);
|
|
background: transparent;
|
|
transition: background 0.1s;
|
|
pointer-events: none;
|
|
content: '';
|
|
position: absolute;
|
|
top: var(--zen-toolbox-padding);
|
|
left: calc(var(--zen-toolbox-padding) + 2px);
|
|
width: calc(100% - var(--zen-toolbox-padding) * 2 - 4px);
|
|
height: calc(100% - var(--zen-toolbox-padding) * 2);
|
|
}
|
|
|
|
:root:not([zen-private-window]) & {
|
|
&:hover,
|
|
&[open='true'] {
|
|
&::before {
|
|
background: var(--tab-hover-background-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
& .zen-current-workspace-indicator-icon {
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.zen-current-workspace-indicator-name {
|
|
opacity: 0.5;
|
|
display: block;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
cursor: auto;
|
|
}
|
|
|
|
.zen-workspaces-actions {
|
|
--toolbarbutton-inner-padding: 4px;
|
|
margin-left: auto !important;
|
|
opacity: 0;
|
|
visibility: collapse;
|
|
transition: opacity 0.1s;
|
|
order: 5;
|
|
}
|
|
|
|
:root:not([zen-private-window]) &:hover .zen-workspaces-actions,
|
|
& .zen-workspaces-actions[open='true'] {
|
|
visibility: visible;
|
|
pointer-events: auto;
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* mark: workspace element */
|
|
zen-workspace {
|
|
flex-direction: column;
|
|
width: calc(100% + var(--zen-toolbox-padding) * 2);
|
|
position: absolute;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
|
|
:root:not([zen-sidebar-expanded='true']) & {
|
|
width: 100%;
|
|
}
|
|
|
|
& > arrowscrollbox {
|
|
max-height: 100%;
|
|
overflow: hidden;
|
|
position: relative;
|
|
|
|
&::part(scrollbutton-up),
|
|
&::part(scrollbutton-down) {
|
|
display: none;
|
|
}
|
|
|
|
&::part(scrollbox) {
|
|
scrollbar-width: auto;
|
|
scrollbar-color: color-mix(in srgb, currentColor 35%, transparent 65%) transparent; /* Custom scrollbar */
|
|
overflow-y: auto;
|
|
}
|
|
|
|
:root[swipe-gesture] &::part(scrollbox) {
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
&[overflowing] {
|
|
--zen-scrollbar-overflow-background: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.08));
|
|
&::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 1px;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.1s;
|
|
background-color: var(--zen-scrollbar-overflow-background);
|
|
}
|
|
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 1px;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.1s;
|
|
background-color: var(--zen-scrollbar-overflow-background);
|
|
}
|
|
|
|
&:not([scrolledtostart])::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
&:not([scrolledtoend])::after {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
&,
|
|
& .zen-workspace-normal-tabs-section {
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
/** Customiable UI, this is an auto generated ID */
|
|
#wrapper-zen-workspaces-button {
|
|
width: 100%;
|
|
}
|