-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Labels
CSSRelated to CSS.Related to CSS.Font (next/font)Related to Next.js Font Optimization.Related to Next.js Font Optimization.PerformanceAnything with regards to Next.js performance.Anything with regards to Next.js performance.create-next-appRelated to our CLI tool for quickly starting a new Next.js application.Related to our CLI tool for quickly starting a new Next.js application.
Description
Link to the code that reproduces this issue
https://github.com/bgub/next-inlinecss-demo
To Reproduce
- Create a new application with create-next-app (TypeScript and Tailwind)
- Enable
experimental.inlineCss
- Deploy to production
- Observe that fonts aren't properly loaded, even after initial load.
Current vs. Expected behavior
What it looks like without the experimental flag
What it looks like with the experimental flag
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Thu, 28 Aug 2025 19:49:53 +0000
Available memory (MB): 15656
Available CPU cores: 20
Binaries:
Node: 22.19.0
npm: 10.9.3
Yarn: 1.22.22
pnpm: 10.15.1
Relevant Packages:
next: 15.5.3 // Latest available version is detected (15.5.3).
eslint-config-next: N/A
react: 19.1.0
react-dom: 19.1.0
typescript: 5.9.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
create-next-app, Font (next/font), CSS, Performance
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed)
Additional context
I'm very excited for the inlineCss flag, because it improves FCP on sites where I've tried it. Unfortunately, apart from the known limitations listed on the documentation page, it completely breaks fonts.
You can see another example at my personal site: https://bengubler-com-git-test-inline-css-ben-gublers-projects.vercel.app/
efd1, dmythro and ValentinGurkovianasqazi
Metadata
Metadata
Assignees
Labels
CSSRelated to CSS.Related to CSS.Font (next/font)Related to Next.js Font Optimization.Related to Next.js Font Optimization.PerformanceAnything with regards to Next.js performance.Anything with regards to Next.js performance.create-next-appRelated to our CLI tool for quickly starting a new Next.js application.Related to our CLI tool for quickly starting a new Next.js application.