mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Refactor ZenCompactMode styles for consistent sidebar positioning and update animation parameters
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
&:not([zen-right-side='true']) #navigator-toolbox {
|
||||
left: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
left: calc(-1 * var(--zen-sidebar-width) + 1px);
|
||||
}
|
||||
|
||||
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
|
||||
@@ -80,7 +80,7 @@
|
||||
--zen-compact-float: calc(var(--zen-element-separation) + 1px);
|
||||
|
||||
&:not([animate='true']) {
|
||||
right: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
right: calc(-1 * var(--zen-sidebar-width) + 1px);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -100,8 +100,6 @@ var gZenCompactModeManager = {
|
||||
},
|
||||
|
||||
updateCompactModeContext(isSingleToolbar) {
|
||||
this.getAndApplySidebarWidth(); // Ignore return value
|
||||
|
||||
const IDs = [
|
||||
'zen-context-menu-compact-mode-hide-sidebar',
|
||||
'zen-context-menu-compact-mode-hide-toolbar',
|
||||
@@ -176,21 +174,20 @@ var gZenCompactModeManager = {
|
||||
{
|
||||
ease: 'easeIn',
|
||||
type: 'spring',
|
||||
stiffness: 3000,
|
||||
damping: 150,
|
||||
mass: 1,
|
||||
bounce: 0,
|
||||
duration: 0.2,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.sidebar.removeAttribute('animate');
|
||||
this.sidebar.style.transition = 'none';
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
this._animating = false;
|
||||
this.sidebar.style.transition = 'none';
|
||||
setTimeout(() => {
|
||||
this._animating = false;
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
});
|
||||
}, 100);
|
||||
});
|
||||
} else if (canHideSidebar && !isCompactMode) {
|
||||
document.getElementById('browser').style.overflow = 'hidden';
|
||||
@@ -211,9 +208,8 @@ var gZenCompactModeManager = {
|
||||
{
|
||||
ease: 'easeOut',
|
||||
type: 'spring',
|
||||
stiffness: 3000,
|
||||
damping: 150,
|
||||
mass: 1,
|
||||
bounce: 0,
|
||||
duration: 0.2,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
|
Reference in New Issue
Block a user