material-ui 4.3.2 dark theme not working

Created on 13 Aug 2019  路  5Comments  路  Source: mui-org/material-ui

  • [x] The issue is present in the latest release.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

Expected Behavior 馃

Steps to Reproduce 馃暪

Steps:

1.
2.
3.
4.

Context 馃敠

Your Environment 馃寧

| Tech | Version |
| ----------- | ------- |
| Material-UI | v4.3.2 |
| React | 16.9.0 |
| Browser | chrome |
| TypeScript | |
| etc. | |
Untitled

incomplete

Most helpful comment

I see. Also when I use component I don't see dark theme showing up automatically.

@prionkor This is another concern, color="default" should work better. But we need to sync with the latest dark specification in v5.

All 5 comments

@hoangtient9 See https://material-ui.com/getting-started/faq/#i-have-several-instances-of-styles-on-the-page.

Here is an example of dark theme not working. Any ideas?

https://codesandbox.io/s/material-ui-dark-theme-gg811

@prionkor You miss the global styles (body background-color and color), you can use the CssBaseline component to apply them automatically. https://codesandbox.io/s/material-ui-dark-theme-kc8t7

@oliviertassinari I see. Also when I use <AppBar /> component I don't see dark theme showing up automatically. I had to use <AppBar color="inherit" /> in order to make appbar dark. do I have to do it for all components? Is there any way to auto inherit dark theme?

I see. Also when I use component I don't see dark theme showing up automatically.

@prionkor This is another concern, color="default" should work better. But we need to sync with the latest dark specification in v5.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HZooly picture HZooly  路  63Comments

aranw picture aranw  路  95Comments

nathanmarks picture nathanmarks  路  100Comments

iceafish picture iceafish  路  62Comments

amcasey picture amcasey  路  70Comments