Skip to content

fix(ui): prevent theme flash and delayed dark mode application#439

Open
SaKaNa-Y wants to merge 1 commit into
vitejs:mainfrom
SaKaNa-Y:fix/theme-fouc-dark-mode
Open

fix(ui): prevent theme flash and delayed dark mode application#439
SaKaNa-Y wants to merge 1 commit into
vitejs:mainfrom
SaKaNa-Y:fix/theme-fouc-dark-mode

Conversation

@SaKaNa-Y

Copy link
Copy Markdown
Contributor

Description

When opening Oxc / Vite / Rolldown for the first time, the UI briefly appears in the light theme and then switches to dark mode. Oxc has a more noticeable issue where it only switches back to dark mode after scrolling.

The main problem is that the theme is not applied before the initial render. I tried making some changes to fix this.

Linked Issues

Additional context

@pkg-pr-new

pkg-pr-new Bot commented Jul 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools@439

@vitejs/devtools-kit

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-kit@439

@vitejs/devtools-oxc

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-oxc@439

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-rolldown@439

@vitejs/devtools-vite

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-vite@439

@vitejs/devtools-vitest

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-vitest@439

commit: e19a1ea

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant