Skip to content

Commit

Permalink
Refactor sidebar panel animation in zen-sidebar-panel.inc.xhtml and z…
Browse files Browse the repository at this point in the history
…en-styles/zen-animations.css
  • Loading branch information
mr-cheff committed Oct 27, 2024
1 parent be376ef commit ea871aa
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 38 deletions.
42 changes: 42 additions & 0 deletions src/browser/base/content/zen-styles/zen-sidebar-panels.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@
#zen-sidebar-web-panel-browser-containers {
height: 100%;
position: relative;

@media (-moz-bool-pref: 'zen.view.experimental-rounded-view') {
mix-blend-mode: multiply;
}
}

#zen-sidebar-introduction-panel {
Expand Down Expand Up @@ -237,3 +241,41 @@
text-align: center;
display: block;
}

#zen-sidebar-web-panel[pinned] {
--sideper: 4000px;
transform-origin: 50% 20%;
}

#zen-sidebar-web-panel[pinned]:not([hidden]) {
animation: better-sidebar-pinned-show 0.15s ease-in-out forwards !important;
}

#zen-sidebar-web-panel[pinned][hidden] {
animation: better-sidebar-pinned-hide 0.15s ease-in-out forwards !important;
}

/** UNPINNED **/
#zen-sidebar-web-panel {
--sideper: 4000px;
/* Sets perspective */
transform-origin: 50% 20%;
}

#zen-sidebar-web-panel:not([hidden]) #zen-sidebar-introduction-panel * {
opacity: 0;
animation: better-sidebar-intro-show 0.5s 0.4s ease-out forwards !important;
}

#zen-sidebar-web-panel:not([hidden]) #zen-sidebar-introduction-panel p {
animation: better-sidebar-intro-show 0.5s 0.8s ease-out forwards !important;
}

#zen-sidebar-web-panel:not([hidden]) {
animation: better-sidebar-show 0.15s ease-in-out forwards !important;
}

#zen-sidebar-web-panel[hidden] {
animation: better-sidebar-hide 0.15s ease-in-out forwards !important;
}

38 changes: 0 additions & 38 deletions src/browser/base/content/zen-styles/zen-sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,41 +73,3 @@
#toolbar-menubar {
display: none !important;
}

#zen-sidebar-web-panel[pinned] {
--sideper: 4000px;
transform-origin: 50% 20%;
}

#zen-sidebar-web-panel[pinned]:not([hidden]) {
animation: better-sidebar-pinned-show 0.15s ease-in-out forwards !important;
}

#zen-sidebar-web-panel[pinned][hidden] {
animation: better-sidebar-pinned-hide 0.15s ease-in-out forwards !important;
}

/** UNPINNED **/
#zen-sidebar-web-panel {
--sideper: 4000px;
/* Sets perspective */
transform-origin: 50% 20%;
}


#zen-sidebar-web-panel:not([hidden]) #zen-sidebar-introduction-panel * {
opacity: 0;
animation: better-sidebar-intro-show 0.5s 0.4s ease-out forwards !important;
}

#zen-sidebar-web-panel:not([hidden]) #zen-sidebar-introduction-panel p {
animation: better-sidebar-intro-show 0.5s 0.8s ease-out forwards !important;
}

#zen-sidebar-web-panel:not([hidden]) {
animation: better-sidebar-show 0.15s ease-in-out forwards !important;
}

#zen-sidebar-web-panel[hidden] {
animation: better-sidebar-hide 0.15s ease-in-out forwards !important;
}

0 comments on commit ea871aa

Please sign in to comment.