mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-28 10:14:12 +00:00
Refactor tab animation styles for improved performance and smoother transitions
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -237,15 +237,22 @@
|
||||
|
||||
& .tabbrowser-tab {
|
||||
transition: scale 0.07s ease;
|
||||
#tabbrowser-tabs:not([dont-animate-tabs='true']) &[fadein='true']:not([zen-essential='true']) {
|
||||
#tabbrowser-tabs &:not([zen-essential='true']) {
|
||||
#tabbrowser-tabs[zen-workspace-animation='previous'] & {
|
||||
animation: zen-slide-in 0.4s ease;
|
||||
animation-delay: 0.2s;
|
||||
animation: zen-slide-in;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[zen-workspace-animation='next'] & {
|
||||
animation: zen-slide-in-reverse 0.4s ease;
|
||||
animation: zen-slide-in-reverse;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[zen-workspace-animation] & {
|
||||
opacity: 0;
|
||||
transform: translateX(-100%);
|
||||
animation-delay: 0.2s;
|
||||
animation-fill-mode: forwards;
|
||||
animation-duration: 0.2s;
|
||||
animation-timing-function: ease;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1327,7 +1327,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
const visibleTabs = new Set();
|
||||
const lastSelectedTab = this._lastSelectedWorkspaceTabs[workspaceUuid];
|
||||
|
||||
this.tabContainer.setAttribute('dont-animate-tabs', 'true');
|
||||
for (const tab of gBrowser.tabs) {
|
||||
const tabWorkspaceId = tab.getAttribute('zen-workspace-id');
|
||||
const isEssential = tab.getAttribute("zen-essential") === "true";
|
||||
@@ -1351,10 +1350,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
gBrowser.hideTab(tab, undefined, true);
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(() => {
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
});
|
||||
|
||||
return visibleTabs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user