diff --git a/.prettierignore b/.prettierignore index afe146d4..9fe0d06c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -23,5 +23,6 @@ docs/issue-metrics/*.md # Some CSS files are preprocessed and prettier doesn't handle them well # We also dont want to format the CSS files that are generated by the build src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css +src/browser/base/content/zen-styles/zen-compact-mode.css src/browser/base/zen-components/ZenEmojies.mjs build/codesign/codesign.bash diff --git a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs-topbuttons-fix.css b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs-topbuttons-fix.css index 21cde169..51fd761b 100644 --- a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs-topbuttons-fix.css +++ b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs-topbuttons-fix.css @@ -4,7 +4,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -& #zen-sidebar-top-buttons:not(:has(toolbarbutton, toolbaritem)) { +& + #zen-sidebar-top-buttons:not( + :has(#zen-sidebar-top-buttons-customization-target > *:not(#zen-sidebar-top-buttons-separator)) + ) { max-height: 0 !important; min-height: 0 !important; opacity: 0; diff --git a/src/browser/base/zen-components/ZenCompactMode.mjs b/src/browser/base/zen-components/ZenCompactMode.mjs index bf9d1fce..53c039d4 100644 --- a/src/browser/base/zen-components/ZenCompactMode.mjs +++ b/src/browser/base/zen-components/ZenCompactMode.mjs @@ -149,13 +149,17 @@ var gZenCompactModeManager = { this._animating = true; const isCompactMode = this.preference; const canHideSidebar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar'); + const canAnimate = + lazyCompactMode.COMPACT_MODE_CAN_ANIMATE_SIDEBAR && + !this.sidebar.hasAttribute('zen-user-show') && + !this.sidebar.hasAttribute('zen-has-hover'); // Do this so we can get the correct width ONCE compact mode styled have been applied - if (lazyCompactMode.COMPACT_MODE_CAN_ANIMATE_SIDEBAR) { + if (canAnimate) { this.sidebar.setAttribute('animate', 'true'); } window.requestAnimationFrame(() => { let sidebarWidth = this.getAndApplySidebarWidth(); - if (!lazyCompactMode.COMPACT_MODE_CAN_ANIMATE_SIDEBAR) { + if (!canAnimate) { this.sidebar.removeAttribute('animate'); this._animating = false; return;