javascript - How to scope CSS in chrome extension content scripts -
i developing chrome extension injects button onto page. when button clicked, launches twitter bootstrap modal. however, css injected twitter bootstrap affecting pages , want them affect modal divs. how can achieve this?
thank you!
there 1 true way , involves less
see answer: https://stackoverflow.com/a/14145510/1060487
or one: https://stackoverflow.com/a/15115171/1060487
both approaches should work fine.
i've experimented 1 other solution:
http://css-tricks.com/saving-the-day-with-scoped-css/
which not work in chrome there polyfill here, doesn't seem work well...
check support here: http://caniuse.com/style-scoped
summary: less route seems best solution right now...
Comments
Post a Comment