I have implemented sweetalert2 alerts in my chrome extension and it renders the alerts differently in different websites. When I look closely at the css in my chrome browser, I realize most of the elements are overridden by the websites. How can I make my css (in this case sweetalert2) to be rendered the same in different websites?
Asked
Active
Viewed 24 times
0
-
If you're loading vendor CSS in your extension, shadow dom is the only fool-proof way to handle this. I don't know much about chrome extensions, but this should get you started https://blog.railwaymen.org/chrome-extensions-shadow-dom - although it looks a bit outdated. Still... It's a starting point. – volt Oct 17 '21 at 09:02