honkit / honkit

:book: HonKit is building beautiful books using Markdown - Fork of GitBook

Home Page:https://honkit.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reuse parent body's scroll overflow instead of making body-inner memorize scroll position

vintprox opened this issue · comments

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.