diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-11-09 16:33:14 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-11-09 16:34:34 +0100 |
| commit | 485a628f0c58f89c7260c710bf3accf5bc2e8fff (patch) | |
| tree | f127f78eb45a3353edf071e69157d22878d3f00e /lib | |
| parent | 63abe1308be087f0658186a303fe9e6843d2166a (diff) | |
| download | chawan-485a628f0c58f89c7260c710bf3accf5bc2e8fff.tar.gz | |
layout: adjust fixed positioning
In CSS, `position: fixed' either a) moves the box on scroll (with
`@media screen'), or b) repeats the box on every page (with
`@media print').
a) would completely mess up our document model, and even if it didn't,
the renderer couldn't handle a redraw on every single scroll.
b) sounds better, but still doesn't work because it's incompatible with
`@media screen' semantics. e.g. in a) I can read text despite any banner
on the bottom of the screen, because the box moves when I scroll, but
in b), the same box will obscure some text on every single page.
So instead, make the `position: fixed' containing box
width: max(:root.width, 100vw); height: max(:root.height, 100vh)).
This is completely non-standard, but at least both TOC-like fixed boxes
*and* banners are placed somewhere that makes some sense.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions