Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Checking the theme via console.log doesn't return the correct mode #41269

Open
Abhishek332 opened this issue Feb 25, 2024 · 1 comment
Assignees
Labels
customization: theme Centered around the theming features docs Improvements or additions to the documentation support: docs-feedback Feedback from documentation page

Comments

@Abhishek332
Copy link

Abhishek332 commented Feb 25, 2024

Related page

https://mui.com/material-ui/customization/how-to-customize/

Kind of issue

Unclear explanations

Issue description

(Previous issue title: "In material ui docs, when we check theme object by console.log theme.palette.mode show dark but in reality MUI comes with light theme by default. console object should show the actual theme object values that MUI uses by default.")

MUI comes with light theme by default but when in docs when we open console and check default value of theme object it shows mode: dark.

Similar issue I faced for palette.primary as well in docs theme object showing there is 50, 100, 200 ....so on property is available for theme.palette.primary but when I check in my project by logging Theme object there is no property available like 50, 100 ....etc.

Theme customization guide should be clear more that show people with example how can we customize theme properly.

This is what docs is showing
Screenshot 2024-02-25 at 5 03 15 PM

This is what theme object is actually providing
Screenshot 2024-02-25 at 5 04 10 PM

Context

I am trying to make color schemes fully customize based on my UI design. I have a way to do it I can define colors and override it using sx props but I believe this should be done from the theme only. So we can handle customize dark and light theme.

Search keywords: theme customize

@Abhishek332 Abhishek332 added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: docs-feedback Feedback from documentation page labels Feb 25, 2024
@zannager zannager added docs Improvements or additions to the documentation customization: theme Centered around the theming features labels Feb 26, 2024
@siriwatknp
Copy link
Member

Thanks for the feedback! our documentation site is built with multiple Material UI themes, so the console might not be useful that much. I think we could improve this in v6 given that we are fully moving to CssVarsProvider.

@siriwatknp siriwatknp added enhancement This is not a bug, nor a new feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer enhancement This is not a bug, nor a new feature labels Feb 27, 2024
@danilo-leal danilo-leal changed the title [docs] In material ui docs, when we check theme object by console.log theme.palette.mode show dark but in reality MUI comes with light theme by default. console object should show the actual theme object values that MUI uses by default. [docs] Checking the theme via console.log doesn't return the correct mode Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: theme Centered around the theming features docs Improvements or additions to the documentation support: docs-feedback Feedback from documentation page
Projects
None yet
Development

No branches or pull requests

3 participants