feat: shorten transition time
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
const overlay = document.createElement('div');
|
||||
overlay.className = 'theme-switch-overlay fixed inset-0 pointer-events-none z-50';
|
||||
overlay.style.opacity = '0';
|
||||
overlay.style.transition = 'opacity 0.3s ease-out';
|
||||
overlay.style.transition = 'opacity 0.15s ease-out';
|
||||
document.body.appendChild(overlay);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
overlay.style.opacity = '0';
|
||||
}
|
||||
document.documentElement.classList.remove('theme-switching');
|
||||
}, 300);
|
||||
}, 150);
|
||||
}, 50);
|
||||
},
|
||||
{ passive: false }
|
||||
|
||||
@@ -8,7 +8,7 @@ const { srcLight, srcDark, alt, style, width, height } = Astro.props;
|
||||
<Image
|
||||
src={srcLight}
|
||||
alt={alt}
|
||||
class:list={['col-start-1 row-start-1 transition-all duration-400 ease-in-out opacity-100 scale-100 dark:opacity-0 dark:scale-65', style]}
|
||||
class:list={['col-start-1 row-start-1 transition-all duration-300 ease-in-out opacity-100 scale-100 dark:opacity-0 dark:scale-65', style]}
|
||||
width={width}
|
||||
height={height}
|
||||
inferSize={true}
|
||||
@@ -17,7 +17,7 @@ const { srcLight, srcDark, alt, style, width, height } = Astro.props;
|
||||
<Image
|
||||
src={srcDark}
|
||||
alt={alt}
|
||||
class:list={['col-start-1 row-start-1 transition-all duration-400 ease-in-out opacity-0 scale-65 dark:opacity-100 dark:scale-100', style]}
|
||||
class:list={['col-start-1 row-start-1 transition-all duration-300 ease-in-out opacity-0 scale-65 dark:opacity-100 dark:scale-100', style]}
|
||||
width={width}
|
||||
height={height}
|
||||
inferSize={true}
|
||||
|
||||
Reference in New Issue
Block a user