mirror of
https://github.com/Xevion/xevion.dev.git
synced 2026-02-01 02:26:53 -06:00
feat: add View Transitions API with persistent backgrounds
- Add fade in/out page transitions using View Transitions API - Move background/dots to root layout for persistence across routes - Hide native scrollbar immediately to prevent FOUC - Set body background in theme script to prevent flash - Increase inline style threshold for better initial render
This commit is contained in:
@@ -204,3 +204,30 @@ body {
|
||||
.os-scrollbar-handle {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* View Transitions API - page transition animations */
|
||||
@keyframes page-fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes page-fade-out {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
::view-transition-old(root) {
|
||||
animation: page-fade-out 120ms ease-out;
|
||||
}
|
||||
|
||||
::view-transition-new(root) {
|
||||
animation: page-fade-in 150ms ease-in 50ms;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user