mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 02:30:51 +08:00
55 lines
1.2 KiB
SCSS
55 lines
1.2 KiB
SCSS
@use '@/styles/variables.scss' as *;
|
|
|
|
.page-transition {
|
|
position: relative;
|
|
flex: 1 1 auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
overflow: hidden;
|
|
|
|
&__layer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-lg;
|
|
min-height: 0;
|
|
flex: 1;
|
|
background: var(--bg-secondary);
|
|
backface-visibility: hidden;
|
|
transform: translateZ(0);
|
|
|
|
// During animation, exit layer uses absolute positioning
|
|
&--exit {
|
|
position: absolute;
|
|
inset: 0;
|
|
overflow: hidden;
|
|
pointer-events: none;
|
|
will-change: transform, opacity;
|
|
}
|
|
|
|
&--stacked {
|
|
display: none;
|
|
|
|
// Keep the previous layer rendered (but invisible) to avoid a blank flash when popping back.
|
|
// Older stacked layers remain `display: none` for performance.
|
|
&.page-transition__layer--stacked-keep {
|
|
display: flex;
|
|
position: absolute;
|
|
inset: 0;
|
|
overflow: hidden;
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
will-change: transform, opacity;
|
|
}
|
|
}
|
|
}
|
|
|
|
&--animating &__layer {
|
|
will-change: transform, opacity;
|
|
}
|
|
|
|
&--animating &__layer:not(.page-transition__layer--exit):not(.page-transition__layer--stacked) {
|
|
position: relative;
|
|
}
|
|
}
|