Skip to content

Conversation

siriwatknp
Copy link
Member

Issues

  • Masonry demos does not appear correctly on dark mode
  • On dark mode, navigating to Container or Breadcrumbs page instantly switched to light mode.

Root cause

  • Masonry: the demos are not using CSS variables.
  • For breadcrumbs and container page, the issue comes from the Toolpad demo (the bottom of the page). Toolpad uses different key for storing mode in the local storage, so when landing on those pages Toolpad will start as system mode (resulted as light in daylight environment).

Fixes

  • Masonry: apply (theme.vars || theme) to colors
  • Toolpad: remove CSS variables from the theme, so that Toolpad uses the same context from the page level and mode is synchronized.

@siriwatknp siriwatknp added docs Improvements or additions to the documentation. type: regression A bug, but worse, it used to behave as expected. labels Mar 28, 2025
@mui-bot
Copy link

mui-bot commented Mar 28, 2025

Netlify deploy preview

https://deploy-preview-45721--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 4630035

Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works fine

@siriwatknp siriwatknp merged commit 79e0bae into mui:master Mar 28, 2025
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation. type: regression A bug, but worse, it used to behave as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants