3 ms·
In my text browser I came up with a way to implement these that doesn't move boxes around the page.[0] In short: treat "position: fixed" as an absolute child o
by shiomiru 2y ago
In my text browser I came up with a way to implement these that doesn't
move boxes around the page.[0] In short: treat "position: fixed" as
an absolute child of the root box, and ignore "position: sticky"
(mostly).
This doesn't completely eliminate sticky headers/footers (problematic
when you actually want to use them), but they behave like normal
elements at the start/end of the page (instead of the screen).
I initially did it this way for technical reasons, but now I kind of
prefer it to what mainstream browsers do.
[0]: https://git.sr.ht/~bptato/chawan/tree/e56399f92d2323f9af95e001f86bd88798ccab2b/item/doc/css.md#codeposition-fixedcode-codeposition-stickycode https://git.sr.ht/~bptato/chawan/tree/e56399f92d2323f9af95e0...
(not a great explanation - it says "bottom", but like "position:
absolute" it's placed at the top if only "top" is specified, etc.)