Dark mode flicker on Vite.js #44250
Labels
customization: css
Design CSS customizability
customization: theme
Centered around the theming features
enhancement
This is not a bug, nor a new feature
package: system
Specific to @mui/system
support: question
Community support but can be turned into an improvement
Steps to reproduce
Dark mode flicker Vite.js version :
https://stackblitz.com/edit/github-5gkalw?file=src%2Fmain.tsx,src%2Ftheme.tsx,src%2FApp.tsx,node_modules%2F%40mui%2Fmaterial%2FCssBaseline%2FCssBaseline.d.ts
For comparison I recreated the Next.js version
https://stackblitz.com/edit/github-rfxsj1?file=src%2Fapp%2Fpage.tsx,src%2Fapp%2Flayout.tsx,src%2Ftheme.ts,src%2Fcomponents%2FApp.tsx
Result
flicker.mp4
Current behavior
Dark mode flicker on Vite.js version with MUI v6.
in MUI v5 when used with
CssVarsProvider
andextendTheme
don't have this problem.Expected behavior
No flicker when refresh page
Context
No response
Your environment
No response
Search keywords: Dark mode flicker
The text was updated successfully, but these errors were encountered: