"매 DOM × CSSOM = Render Tree". Browser는 매 parsed HTML (DOM) 과 매 styles (CSSOM) 을 매 merge — visible nodes만 매 골라 layout, paint, composite의 input 으로 사용. 2026 Chromium은 매 LayoutNG + RenderingNG로 매 진화.
매 핵심
매 Pipeline (Critical Rendering Path)
HTML → DOM (tokenize + tree construct).
CSS → CSSOM (parse stylesheets, compute cascade).
DOM + CSSOM → Render Tree — 매 display: none 노드는 매 제외, ::before/::after 매 포함.
Layout (Reflow) — geometry 계산.
Paint — pixel commands → layers.
Composite — GPU layer merge → screen.
매 Render Tree ≠ DOM
DOM 의 모든 노드 의 X. <head>, <script>, display:none 매 제외.
visibility: hidden 의 매 포함됨 (매 space 차지).
Pseudo-elements (::before) 매 추가됨 (DOM 에 없음).
매 Blocking
CSS 의 render-blocking by default: CSSOM 완성 전에는 매 render tree 못 만듦.
<script> 의 parser-blocking — defer/async로 완화.
<link rel="preload"> + media query 매 selective load.
매 2026 modern state (RenderingNG)
LayoutNG — fragment tree로 매 incremental, isolation.
CompositeAfterPaint (CAP) — paint ordering 의 매 composite 단계로 통합.
Off-main-thread scrolling/animation — composite-only properties (transform, opacity) 매 main thread skip.
content-visibility: auto — 매 viewport 외 subtree skip layout/paint.
매 응용
Critical CSS inline → 매 first paint 단축.
content-visibility: auto 매 long page virtualization.
will-change: transform 매 layer promotion hint.
💻 패턴
Critical CSS inline
<head><style>/* above-the-fold only */.hero{font-size:3rem;color:#111;}</style><linkrel="preload"href="/main.css"as="style"onload="this.rel='stylesheet'"></head>
언제: performance audit explanations, CSS-perf debugging.
언제 X: production profiling은 매 real Chrome DevTools / Lighthouse / WebPageTest 사용 — LLM의 매 verification은 X.
❌ 안티패턴
Layout thrashing: read/write 매 interleave → forced synchronous layout.
top/left animation: triggers layout per frame; use transform.
거대 inline <style>: matched HTML cache의 invalidation. Critical only.
will-change overuse: 매 모든 element 에 적용 → memory blow-up.