docs: document Gotcha #14 (body over html), retake screenshots for light theme
Some checks failed
CI / Backend (Python) (push) Failing after 1m11s
CI / Frontend (Vue) (push) Failing after 20s
Mirror / mirror (push) Failing after 8s

This commit is contained in:
pyr0ball 2026-05-08 15:49:47 -07:00
parent 73132222a2
commit fc3bd8859e
6 changed files with 7 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View file

@ -8,7 +8,9 @@
<!-- Apply stored theme before first paint — prevents FOUT flash on dark/hacker themes. <!-- Apply stored theme before first paint — prevents FOUT flash on dark/hacker themes.
Mirrors the logic in useTheme.initTheme(). Must run before the <style> below. --> Mirrors the logic in useTheme.initTheme(). Must run before the <style> below. -->
<script>try{if(localStorage.getItem('cf-hacker-mode')==='true'){document.documentElement.dataset.theme='hacker';}else{var t=localStorage.getItem('cf-theme');if(t&&t!=='auto')document.documentElement.dataset.theme=t;}}catch(e){}</script> <script>try{if(localStorage.getItem('cf-hacker-mode')==='true'){document.documentElement.dataset.theme='hacker';}else{var t=localStorage.getItem('cf-theme');if(t&&t!=='auto')document.documentElement.dataset.theme=t;}}catch(e){}</script>
<!-- FOUT prevention: background only on html (body is transparent). <!-- FOUT prevention: background only on html (body is transparent). Gotcha #14.
body paints on top of html — a hardcoded body background covers html's CSS-
variable-driven color even when it resolves correctly. Keep background off body.
Covers auto mode (media query) and all explicit theme choices. --> Covers auto mode (media query) and all explicit theme choices. -->
<style> <style>
html, body { margin: 0; min-height: 100vh; } html, body { margin: 0; min-height: 100vh; }

View file

@ -71,6 +71,10 @@ html {
} }
body { body {
/* Gotcha #14: do NOT set background on body. body paints on top of html
a hardcoded body background will cover html's CSS-variable-driven color
even when html { background: var(--color-surface) } resolves correctly.
FOUT prevention lives in index.html on html only, not body. */
min-height: 100dvh; /* dynamic viewport — mobile chrome-aware. Gotcha #13. */ min-height: 100dvh; /* dynamic viewport — mobile chrome-aware. Gotcha #13. */
overflow-x: hidden; overflow-x: hidden;
} }