mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
perf(topbar): optimize scroll up/down animation with GPU acceleration
This commit is contained in:
@@ -52,7 +52,9 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
transition: top 0.2s ease-in-out;
|
will-change: transform;
|
||||||
|
transform: translateY(0);
|
||||||
|
transition: transform 0.2s ease-in-out;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ const TopBarMobile = ({ subplebbitAddress }: { subplebbitAddress: string }) => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.boardNavMobile} id='sticky-menu' style={{ top: visible ? 0 : '-23px' }}>
|
<div className={styles.boardNavMobile} style={{ transform: visible ? 'translateY(0)' : 'translateY(-23px)' }}>
|
||||||
<div className={styles.boardSelect}>
|
<div className={styles.boardSelect}>
|
||||||
<strong>{t('board')}</strong>
|
<strong>{t('board')}</strong>
|
||||||
{boardSelect}
|
{boardSelect}
|
||||||
|
|||||||
Reference in New Issue
Block a user