honkit/honkit
Reuse parent body's scroll overflow instead of making body-inner memorize scroll position
Aperta
#310 aperta il 2 nov 2022
Type: Themehelp wanted
Metriche repository
- Star
- (3450 stelle)
- Metriche merge PR
- (Merge medio 5g 14h) (3 PR mergiate in 30 g)
Descrizione
It's usually a good practice to use <body> or <html>'s scroll behavior, because browsers implement a reproducible scroll position. Problem with current approach that was inherited from GitBook is one having CSS rule .body-inner { overflow-y: auto } and unnecessarily leaving memorization to JavaScript, which produces white flash on page reload.
Parent body must take the height of main content that currently resides in div.body-inner. I think it won't take much layout reworking: just make .book-summary sticky and remove scroll overflow from inner body.