I am trying to build a chrome extension which injects an HTML popup on the host page via content script.
I am adding this popup using shadowRoot to avoid collisions with the main page. Also, I am using bootstrap on the popup for styling. One issue which is happening is that, bootstrap defines many of its component properties in rem
units which are relative to the font-size
of page root(html
element) and not the shadow root. This messes up with popup's CSS as some pages have very small font-size
defined on their root.
I wanted to understand if its possible to define a new root with font-size
for the ShadowRoot or somehow override the root value being used in the popup via bootstrap!
Thanks a lot, really appreciate any help!