CSUI without ShadowDOM

From @tyn1998 Ref: https://discord.com/channels/946290204443025438/946290204904390690/1044536470133809182 I'm developing an extension called which injects some charts to GitHub pages. Recently I consider to refactor the project with the great framework Plasmo and I read about the article about "CSUI" which points out that Plasmo makes use of shadowDOM to inject the UI, so host page's stylesheet won't affect the CSUI we inject into the page. However, Hypercrx does want to use the stylesheets from GitHub directly so it can looks similar to other elements on GitHub. Can shadowDOM feature be an opt in/out option or is there any other way that I can use the styles provided by the host page?
8 Replies
lab
lab•2y ago
Please see this example: https://github.com/PlasmoHQ/examples/blob/main/with-content-scripts-ui/contents/plasmo-root-container.tsx The documentation for CSUI is a bit outdated xd... so you will need to dig a bit into the framework for the typing of the new CSUI lifecycle Basically, in that example, the getRootContainer overrides return the root element that will be used to mount the CSUI in the page, and the render override is used to directly render the CSUI to the root container
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
lab
lab•2y ago
yupp xD... We recently updated the frontpage but didnt' update the selector for those example xd
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
lab
lab•2y ago
A PR would be awesome! And let's use the #itero section as the new selector?
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
lab
lab•2y ago
You can either create an issue or reference this discord thread on the PR - whichever is more convenient :p
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server