-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
breaking changeIntroduces changes that are not backward compatible.Introduces changes that are not backward compatible.priority: importantThis change can make a difference.This change can make a difference.scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUItype: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.
Description
Supporting CSS variables would:
- Support CSS variables as theme option #12827 (comment): open up avoiding flickering of dark mode websites implemented in frameworks like Next.js or Gatsby! (This seems to be the case on the https://material-ui.com/ website itself! Eg. if you set dark mode and refresh, the page will briefly show up in light mode, and then change to dark mode, causing a flicker)
Problem demonstrated: https://joshwcomeau.com/css/css-variables-for-react-devs/#dark-mode-flash-fix
Solution with CSS variables: https://joshwcomeau.com/gatsby/dark-mode/ - [styles] Memoize makeStyle result to avoid rerendering #25018: make the switch between dark and light feel more instant. Relying on CSS cascading will always be faster than React context cascading.
Benchmark
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breaking changeIntroduces changes that are not backward compatible.Introduces changes that are not backward compatible.priority: importantThis change can make a difference.This change can make a difference.scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUItype: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.