Empty <style> elements created for each <Box> component
See original GitHub issueHi,
I just noticed this strange behaviour in the rendered HTML and I believe it’s a library bug, but I don’t know what’s causing it. It happens in both development and build modes.
Current behaviour
For each <Box>
component in the JSX, a new <style data-jss="" data-meta="MuiBox"></style>
node (empty) is added in the <head>
.
Expected behaviour
It just shouldn’t do this.
Steps to reproduce
Go to https://kdd7w.csb.app/ and see the rendered output. The code can be found here: https://codesandbox.io/s/material-ui-style-elements-bug-kdd7w
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
empty - CSS: Cascading Style Sheets - MDN Web Docs
The :empty CSS pseudo-class represents any element that has no children. Children can be either element nodes or text (including whitespace) ...
Read more >Using the Box Component in Material-UI to Easily Style Your ...
The Box component in Material-UI is very useful for styling elements in a React app. You can do so without using any separate...
Read more >empty - CSS-Tricks
The CSS :empty pseudo-class selects any element that does not contain children for a given selector.
Read more >What is the MUI Box component for? - Stack Overflow
In MUI v5, all MUI components allow you to define CSS styles via ... I often think of it as semantically similar to...
Read more >8 Box model - W3C
Each box has a content area (e.g., text, an image, etc.) and optional surrounding padding , border , and margin areas; the size...
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
@nuragic Two thoughts here.
Aahhh ok got it! 🙏 🆗 👌