I am currently working on developing a unique "plugin" that will feature a user interface to be integrated into various vendor websites. This particular plugin is designed to be CMS agnostic, and due to SEO concerns, I am unable to utilize an iframe. My goal is to ensure that the plugin's CSS (and potentially JS) remains separate from the website's overall styling, preventing any cross-contamination. How can I successfully achieve this?
Update:
Upon reflection, I realize that my initial question was too specific to my own setup and technology stack. A broader inquiry would be: How can I effectively isolate an HTML element from the rest of the document's styles? For more information, please refer to this resource.
New Question: How can I scope Vue CSS in a way that restricts style inheritance to child components while preventing leakage to the main website?
For instance, I have a primary Vue component that incorporates bootstrap.scss
. I want these styles to apply to all child components without affecting the main website's styling. While utilizing scoped
in the CSS prevents upward leakage, I seek a solution where these styles are also passed down to child classes. How can I achieve this?