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;
|
||||
width: 100%;
|
||||
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;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ const TopBarMobile = ({ subplebbitAddress }: { subplebbitAddress: string }) => {
|
||||
}, []);
|
||||
|
||||
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}>
|
||||
<strong>{t('board')}</strong>
|
||||
{boardSelect}
|
||||
|
||||
Reference in New Issue
Block a user