mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-16 06:46:12 +00:00
fix: simplify sidebar width calculation and remove unnecessary animated padding attribute
This commit is contained in:
@@ -116,13 +116,7 @@
|
|||||||
outline-offset: -1px;
|
outline-offset: -1px;
|
||||||
/* times 4 because we have the inner padding and the outter padding to consider */
|
/* times 4 because we have the inner padding and the outter padding to consider */
|
||||||
:root[zen-sidebar-expanded='true'] & {
|
:root[zen-sidebar-expanded='true'] & {
|
||||||
&[has-animated-padding='true'] {
|
width: calc(var(--zen-sidebar-width) - var(--zen-toolbox-padding));
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:root[zen-single-toolbar='true'] {
|
:root[zen-single-toolbar='true'] {
|
||||||
|
@@ -193,9 +193,6 @@ var gZenCompactModeManager = {
|
|||||||
const titlebar = this.sidebar.querySelector('#titlebar');
|
const titlebar = this.sidebar.querySelector('#titlebar');
|
||||||
if (canAnimate) {
|
if (canAnimate) {
|
||||||
this.sidebar.setAttribute('animate', 'true');
|
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-right');
|
||||||
this.sidebar.style.removeProperty('margin-left');
|
this.sidebar.style.removeProperty('margin-left');
|
||||||
|
Reference in New Issue
Block a user