Fix white border flash on first paint

Route CSS (src/site/styles.css, admin.css) is code-split and only loads once
its lazy route's chunk arrives, so the default browser body margin showed as
a white ring around the dark Suspense fallback until then. Reset html/body
margin directly in index.html so it applies before any JS runs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-02 18:03:39 +05:00
parent 490b5fe55f
commit 84605dcf1a

View File

@@ -27,6 +27,12 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&family=Ubuntu+Mono:wght@400;500;700&display=swap">
<!-- Route CSS (src/site/styles.css etc.) is code-split and loads with each
lazy route, so without this the default browser body margin shows as a
white ring around the dark Suspense fallback on first paint. -->
<style>
html, body { margin: 0; padding: 0; }
</style>
</head>
<body>