fix: simplify sidebar width calculation and remove unnecessary animated padding attribute

This commit is contained in:
mr. m
2025-04-07 11:00:19 +02:00
parent f2c6d0a6b9
commit ce55e7eed5
2 changed files with 1 additions and 10 deletions

View File

@@ -116,13 +116,7 @@
outline-offset: -1px;
/* times 4 because we have the inner padding and the outter padding to consider */
:root[zen-sidebar-expanded='true'] & {
&[has-animated-padding='true'] {
width: calc(var(--zen-sidebar-width) + var(--zen-toolbox-padding));
}
&:not([has-animated-padding='true']) {
width: calc(var(--zen-sidebar-width) - var(--zen-toolbox-padding));
}
width: calc(var(--zen-sidebar-width) - var(--zen-toolbox-padding));
}
:root[zen-single-toolbar='true'] {

View File

@@ -193,9 +193,6 @@ var gZenCompactModeManager = {
const titlebar = this.sidebar.querySelector('#titlebar');
if (canAnimate) {
this.sidebar.setAttribute('animate', 'true');
titlebar.setAttribute('has-animated-padding', 'true');
} else {
titlebar.removeAttribute('has-animated-padding');
}
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');