Isolating components in iframe
See original GitHub issueFeature request
What problem does this feature solve?
Styles intersection.
What does the proposed API look like?
Users components might be wrapped with iframe.
How should this be implemented in your opinion?
As a plugin.
Are you willing to work on this yourself?
Yes, but for now I don’t know where to start.
Okay, I am developing design system and vue components library and found that my components styles are overwritten by vuepress default theme. Specifically component like table, etc. So it would be great if we can develop plugin/component which will render provided component in iframe.
Example:
<v-frame>
<my-button>My isolated button</button>
</v-frame>
This might be extremely useful for UI library authors.
I’d develop this plugin/component but need to help to figure out how to throw styles into iframe?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:16 (9 by maintainers)
Top Results From Across the Web
Do Web Components now support iframe-like security isolation?
Simple answer: No. Web Components Do not isolate JS. Just DOM and CSS. But you can put all of your JS within your...
Read more >How to Use The Shadow Dom To Isolate Styles on a ... - Courier
In this post, we will explain, in great detail, how to use Shadow DOM as an API for DOM encapsulation. Perfect for when...
Read more >Bringing componentization to the web - Windows Blog
The goal of web components is to reduce complexity by isolating a related ... Global object isolation; Element encapsulation (the iframe) ...
Read more >The ultimate guide to iframes - LogRocket Blog
Because an iframe offers an isolated environment, this means that the focus or the selection is never lost when you are clicking outside...
Read more >Browser code isolation
HOW CAN WE RESTRICT. EXECUTION AND. COMMUNICATION? Page 27. Two ways to restrict execution. HTML5 iframe Sandbox. ▫ ...
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
One reason more not to use iframes.
Just use more specific selectors or variables.
Just use a shadow DOM, then your styles will be isolated, they can only be overwritten by variables, which you can control by giving a unique name.