mirror of
https://github.com/plebbit/seedit.git
synced 2026-02-05 19:40:59 -05:00
perf(topbar): optimize scroll up/down animation with GPU acceleration
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 6;
|
||||
transition: top 0.2s ease-in-out;
|
||||
will-change: transform;
|
||||
transform: translateY(0);
|
||||
transition: transform 0.2s ease-in-out;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ const StickyHeader = () => {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className={styles.content} style={{ top: visible ? 0 : '-40px' }}>
|
||||
<div className={styles.content} style={{ transform: visible ? 'translateY(0)' : 'translateY(-40px)' }}>
|
||||
<TopBar />
|
||||
<AccountBar />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user