[Theme] Body background color is not being changed
See original GitHub issueDescribe the bug https://codesandbox.io/s/chakra-ts-starter-sn639
I have created a theme and changed the background however it is not being applied
const customTheme = {
...theme,
colors: {
...theme.colors,
background: "red.500"
}
};
function App() {
return (
<ThemeProvider theme={customTheme}>
<Heading>Welcome</Heading>
</ThemeProvider>
);
}
Expected Behavior
The body background
should change to red.500
To Reproduce https://codesandbox.io/s/chakra-ts-starter-sn639
Desktop (please complete the following information):
- OS: macOS Mojave 10.14.6
- Browser: Firefox Developer Edition
- Version: 77.0b9
Additional context
https://theme-ui.com/theming/, says here changing the body
, changes the Body background color
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
body background color not showing? - html - Stack Overflow
Check the network tab to make sure Stylesheets/main.css is getting loaded. Check the style inspector to make sure background-color is not being overridden....
Read more >Site Background Color is not changing - WordPress.org
If you meant changing the overall skin color of the site to a lighter theme, go to Customizer->Global->Colors->Skin Color and you should see...
Read more >Why is my background color not changing? - HTML-CSS
Ideally, outside of codepen, you would solve that by making sure that your CSS file is called after bootstrap one.
Read more >Change the site background color in WordPress - GoDaddy
Note: If you have a premium WordPress theme, check the theme documentation on how to change the background color, because the following option...
Read more >How to Change Text and Background Color in CSS
If there is no body selector or color defined in the body selector, the default color is most likely black. So let's say...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can set the background color on the
<CSSReset/>
element. Check this updated codesanbox https://codesandbox.io/s/chakra-ts-starter-fn3yt?file=/src/index.tsxOh dang, thank you @santialbo , I think this works for me so I’ll be closing this issue.