Skip to content

Instantly share code, notes, and snippets.

@shakyShane
Created May 31, 2026 08:47
Show Gist options
  • Select an option

  • Save shakyShane/c2618075cbcaa44e4f3e5e3b5b93a5b0 to your computer and use it in GitHub Desktop.

Select an option

Save shakyShane/c2618075cbcaa44e4f3e5e3b5b93a5b0 to your computer and use it in GitHub Desktop.
nextssg: cross-entry homepage CSS impact tables (inlineCss, gzip, noai spillover)

nextssg homepage cross-entry CSS impact (engineer reference)

Build setup: experimental.inlineCss: true, static export compare (apps/benchmark/compare-static-export.mjs).
Baselines: origin/main @ 33f9144; mobile promo branch @ adfd823; thin-ATF experiment (no DS on mobile sync/lazy tagline edges) @ local thin-atf-exp.


Compressed HTML (gzip) — all three entry points

Entry HTML main (33f9144) Branch + DS (adfd823) Δ vs main Thin-ATF (local) Δ vs main Δ thin vs branch+DS
noai en-US.html 45.9 KiB 70.7 KiB +24.8 KiB (+54%) 56.3 KiB +10.3 KiB (+22%) −14.4 KiB
mobile en-US/home/mobile.html 46.9 KiB 79.1 KiB +32.2 KiB (+69%) 64.3 KiB +17.4 KiB (+37%) −14.8 KiB
desktop en-US/home/desktop.html 32.0 KiB 42.1 KiB +10.1 KiB (+32%) 42.1 KiB +10.1 KiB (+32%)

Brotli (same builds): noai 24.3 → 35.5 (+11.1 KiB) branch+DS; 24.3 → 29.6 (+5.3 KiB) thin-ATF.


Uncompressed en-US.html (noai) — inline <style> payload

Metric main Branch + DS Thin-ATF
Raw HTML ~192 KiB ~372 KiB ~249 KiB
Inline <style> total ~40 KiB ~118 KiB ~56 KiB
Δ inline vs main +78 KiB +16 KiB

Attribution (noai gzip vs main)

Contributor Approx. Δ gzip (noai) Notes
Mobile promo + DS on sync + lazy merge edges ~+25 KiB Full branch+DS build; customizer/feedback/BTF/DS link-button in noai <style>
Recovered by thin-ATF (no DS on mobile sync; DS only in async islands) ~−14 KiB 70.7 → 56.3 KiB gzip on noai
Residual mobile SCSS spill (no DS on noai) ~+10 KiB mobile-atb-banner-module still in noai <style>; no customizer/feedback/BTF/DS link-button
Shared layout / graph tax (desktop, no mobile UI) ~+10 KiB Desktop HTML +10.1 KiB gzip with almost no desktop-specific promo UI

/home/mobile initial inline CSS (H6 acceptance)

Build ~Inline <style> in home/mobile.html homepage-customize-feedback-module in initial <style>? mobile-home-customizer-module in initial <style>?
Branch + DS ~124 KiB Yes Yes
Thin-ATF ~56 KiB No No

dynamic(ssr: false) defers JS/DOM; CSS stays in first HTML until sync paths stop importing design-system (tagline LinkButton was the demonstrated merge edge).


Selector presence in noai en-US.html <style>

CSS module / DS main Branch + DS Thin-ATF
mobile-atb-banner-module
mobile-home-customizer-module
homepage-customize-feedback-module
mobile-below-the-fold-module
DS link-button

Operating rules (short)

  1. CRP per route — sync imports only; no @staticpages/design-system on /home/mobile sync graph.
  2. DS allowed only under true async islands (customizer → feedback, SAD modal, BTF) with no sync DS bridge.
  3. Ship gate — post-build grep + gzip on all three HTML files, not just the route you edited.
rg 'homepage-customize-feedback-module|mobile-home-customizer-module' \
  apps/nextssg/out/en-US.html apps/nextssg/out/en-US/home/mobile.html
rg 'mobile-atb-banner-module' apps/nextssg/out/en-US.html

One-line summary

Shared inlineCss merge means mobile ATF work cost +25 KiB gzip on noai at peak; thin-ATF left +10 KiB of mobile SCSS spill while ~15 KiB was DS + lazy CSS folded into every entry’s HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment