What is the recommended way to write content Script so that its CSS does not affect the web page and vice versa?
Right now, I am writing CSS for elements inserted through contentScript.js in the contentScript.css file and including it in manifest.json but the CSS of the extension is interfering with the website and the website's CSS is interfering with the extension's.
I can avoid contentScript CSS from interfering with the website's CSS by simply writing cryptic CSS className in the content script but I can't get the website's CSS to not interfere with the Extension's elements.
Some ways I am aware of:
ShadowDOM : but to my knowledge, you have to write inline CSS, which sucks. Is there any other way?