Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Prevent styling of DOM elements inserted by Chrome extension

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #40037
    shawnp
    Member

    Hello,

    I created a browser extension that inserts DOM elements directly into a page, and I’d like to prevent them from being styled by any inherited CSS already in the page. At the moment, I append my a css call to the head to bring in my own styles. So far my plan has been to use obscure class/id names and create very specific rules. In some cases I’ve had to use !important. I feel like I’m throwing throwing my morals out the door!

    Any thoughts on how I could efficiently prevent inherited styling, and yet allow the browser to render my code efficiently?

    Any thoughts on how I could use an iframe to do this?

    Thanks!

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.