Adding font-family on body does not override, maybe specificity ? #14690
-
Hi, Can anyone help ? I tried adding this to the body in my global.css file, --font-outfit is valid,
color and background changes... but font-family doesn't. If I put it on the HTML tag, then it does. I am guessing its specificity, I noticed this when only applied to the body
by checking the computed, I think htm, :host is a higher specificity than just body ? I am trying to understand where it comes from. Is there a CSS reset on tailwind that does this ? After understanding it :-) What is the recommended way of overriding the font-family ? Thanks in advance Ian |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Seems like it should work, as per this Tailwind Play. Consider providing a reproduction showcasing it not working. |
Beta Was this translation helpful? Give feedback.
html,:host
does indeed has more specificity thanbody
, but you override thefont-family
with abody
rule anyway.Works for me at least: