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:
2026-01-12 13:27:14 -06:00
parent 97bef535a3
commit 99f9b5e303
5 changed files with 91 additions and 11 deletions
+27
View File
@@ -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;
}