-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is your feature request related to a problem? Please describe.
When using styles inside a shadow root, styles are not applied, because react-native-web attaches styles to the document root
Describe a solution you'd like
Automatically attach styles to the shadow root instead of the document root if one is present. Resolve issues of cascading rules where a shadow root breaks up parents from children.
Describe alternatives you've considered
Avoid having styles compiled into a stylesheet with classes altogether, and have all styles inlined on components.
Additional context
The primary context here is that my react app is rendered inside a custom element, which can be included on anyone else's page as a widget. In order to get style isolation, I must render my app inside a shadow root (natively, or using react-shadow
). This gives me proper style isolation from the outer (uncontrolled) application, but it also causes me to lose all of my styles from react-native-web.