Material-ui: [core] Add example rendering in iframe, popup and shadow DOM

Created on 17 Nov 2018  路  24Comments  路  Source: mui-org/material-ui


Material-UI Componentss not rendering properly when those are inside

-->
Link: https://codesandbox.io/s/rjo0r3yooo

  1. Please go to sandbox link provided in the above

Context

Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | v3.5.1 |
| React | v16.6.3 |
| Browser | chrome |

docs good first issue important

Most helpful comment

In our project, we use Material-UI in ShadowRoot. We've resolved the problem and use it in production.

To archive this, I write a custom JSS Renderer and use a new web feature called Constructable StyleSheets to dispath stylesheets between different ShadowRoots.

Our solution also works for MUI's portal.

https://github.com/DimensionDev/Maskbook/tree/master/src/utils/jss

This is a AGPL-v3-or-later project, but the core of the custom JSS renderer ConstructableStyleSheetsRenderer is MIT licenced to the JSS project.

All 24 comments

12125

I don't how this issue (#12125) has been closed without fixing it, or if I am missing anything specific to iframe ? If so could you please fix this https://codesandbox.io/s/rjo0r3yooo and share the url back

Material-UI is not working inside