Only fade wallpaper pics for slideshow

This commit is contained in:
Dustin Brett 2025-03-20 20:49:37 -07:00
parent c4336cac73
commit a9589a9cb6
2 changed files with 7 additions and 3 deletions

View File

@ -428,6 +428,10 @@ const useWallpaper = (
const isTopWindow = window === window.top;
const isAfterNextBackground = isBeforeBg();
document.documentElement.style.setProperty(
"--background-transition-timing",
isSlideshow ? "1.25s" : "0s"
);
document.documentElement.style.setProperty(
`--${isAfterNextBackground ? "after" : "before"}-background`,
`url(${CSS.escape(

View File

@ -43,19 +43,19 @@ const GlobalStyle = styled.createGlobalStyle`
content: "";
height: 100%;
position: absolute;
transition: opacity 1.25s ease-in-out;
transition: opacity var(--background-transition-timing, 0s) ease-in-out;
width: 100%;
z-index: -1;
}
&::before {
background: var(--before-background);
opacity: var(--before-background-opacity);
opacity: var(--before-background-opacity, 0%);
}
&::after {
background: var(--after-background);
opacity: var(--after-background-opacity);
opacity: var(--after-background-opacity, 100%);
}
}