0
votes

I am using material-ui Box component and I've found out that this component got it's styles properly attached (they are showing up inside chrome devtools), however they are not anywhere in DOM.

Example link: https://codesandbox.io/s/material-demo-0eyld

Steps:

  1. Open dev tools
  2. Select first Box div element
  3. Click on styles so they should link you to corresponding class in DOM
  4. You will be linked to empty style tag.

Google chrome shows these styles on gray background so they look like additional agent stylesheet classes. That confuses me even more.

How is this possible ? I've go through material-ui repository code although I didn't found anything particular. Had anyone seen something similar ?

1
Please add your code, we can't really help you without code.Blacky

1 Answers

0
votes

I've found the answer here, material-ui Box component is using this API in development mode hence the issue with missing styles in DOM.