Firefox paints decdn.org before the stylesheet applies on reload
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- next.js, react, typescript
- Ambito
- frontend, performance
Direzione di ricerca
Start by reproducing the reload in Firefox with the console open and follow the “Layout was forced” warning to the responsible script. Inspect Chrome.tsx and its layout reads, then retry in a private window or Troubleshoot Mode to check for extension involvement. Done means identifying the cause and confirming reloads no longer show an unstyled paint.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Symptom
On reload in Firefox (Linux), decdn.org shows the page fully unstyled for ~250 ms (three frames of a ~12 fps screen recording) before the CSS applies: serif text, bulleted nav and drawer lists, default blue links. Before #330 this also drew the hero's litepaper icon at full container width as a blue block. #330 made the icons harmless, but the unstyled paint itself remains.
Confirmed
- In the user's recording, frames before the first styled frame show the raw HTML with no stylesheet applied (wordmark
<img>not yet painted either). - The stylesheet is a single render-blocking
<link rel="stylesheet" href="/_next/static/chunks/….css" data-precedence="next">in<head>, servedtext/css, allowed by the CSP.
Not reproduced
- Headless Chromium (Playwright, chromium-1234), cold and throttled (300 ms latency, 200 KB/s), 1440×900 and 390×844: screencast frames go blank → styled with nothing in between.
- Playwright Firefox (firefox-1511), cold load and prime-then-reload, with the CSS response held 1.5 s: no unstyled paint and no
requestAnimationFrametick sees unstyled layout. The paint waits for the CSS. document.getAnimations()at load shows only the intended entrance animations. The mobile drawer's overlay and panel (prerendered since #324) do not animate on load.
Hypotheses (unconfirmed)
- A script forces layout before the CSS lands. This is Firefox's documented FOUC trigger. The console warns "Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content." Async scripts are not held back by a pending stylesheet the way parser-blocking ones are. On reload the JS chunks can be ready before the CSS revalidation round-trip completes. Candidates that read layout on mount:
Chrome.tsx(navRef.current.offsetHeight,window.innerHeight,window.scrollY), plus anything in Next's bootstrap. - A browser extension (content script running at
document_startordocument_idle) forcing layout. That would also explain why clean Playwright profiles don't reproduce it.
Next steps
- Reload decdn.org in Firefox with the console open and check for the "Layout was forced" warning; it links to the script responsible.
- Retry in a private window or Troubleshoot Mode (extensions off).
- If it's our code: defer the layout read until after
load, or untildocument.styleSheetsis complete.
Related: shortening the window by caching hashed assets as immutable (#332).
- Lingua principale
- TypeScript
- Stelle
- 3
- Fork
- 0
- Merge medio
- 12h 41m
- PR unite (30g)
- 70
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di decdn/website
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
bug med-priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement low-priority
Difficoltà 4/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement low-priority
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
decdn/website#268 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di decdn/website
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
maniator/verticopolis#1303 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
components-web-app/docs#297 ·
-
listFeatures/getFeatureExamples never return Kotlin examples for Android or server Kotlin SDKsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
appwrite/mcp-for-docs#23 · 1 commento ·
-
`@vanilla-extract/turbopack-plugin`: "getImageSize is not a function" with Next.js 16.4.x when a `.css.ts` file imports an imageForse già presa @aevarOrigo l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vanilla-extract-css/vanilla-extract#1799 · 1 commento ·
-
native
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
prime-radiant-inc/evener#4839 ·
I maintainer di solito rispondono entro 1 giorno