Replies: 1 comment
-
did you get an answer for this question? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm running Svelte with TailwindCSS. Here's my content script setup:
The trouble however is that some sites have this weird rem reset method where they set
html { font-size: 62.5% }
. Now because TailwindCSS usesrem
, this obviously messes up all the styles applied in the overlay of my content script.The issue visualized in a simple repro:

You can't tell, but the size of the overlay is scaled down (
h-20
is80px
, while it's rendered at50px
, etc).It's weird because even though the manually set
font-size: 62.5%
appears to be overwritten by bothtext-base
andfont-size: 16px !important; all: initial !important;
, it's still scaling down the entire overlay, because Tailwind sees the base as62.5%
, not100%
. So clearly the reset is not working and the host styles are still bleeding in.How do you do the reset to ensure things like these aren't conflicting?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions