-
I have a sveltekit app using tw and tw typography. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Fix without
This ensures your custom
You can:
Or set defaults with Practical Fix
to:
|
Beta Was this translation helpful? Give feedback.
-
Hey psupra22, Thank you for the excellent advice! Your suggestions, especially about using @layer base, were the key and put me on the right track to solving this. Sharing the final solution, as there was one BIG mistake in my app.css. My global p styles were already in the base layer, but were too specific. Thus the prose size modifiers weren't working. This was my rule in app.css: CSS @layer base { The responsive sm:text-lg utility was causing a conflict with the prose classes on larger screens. When i removed all font-size utilities from my default p style in the base layer, everything worked as intended. Final app.css rule: CSS @layer base { Thanks again psupra22 for your help! Your advise pointed me in the right direction - and I could IDENTIFY what I was doing WRONG. Highly unlikely that someone else is making the same mistake... but hope this helps someone else who runs into the same issue. |
Beta Was this translation helpful? Give feedback.
-
Thanks again! |
Beta Was this translation helpful? Give feedback.
Fix without
!important
Instead of
p { … }
inapp.css
, do something like:This ensures your custom
p
rules don’t override.prose p
.In SvelteKit with Tailwind,
app.css
usually gets included last. If you move your custom CSS before Tailwind’s layers, Tailwind will win:Instead of raw CSS:
You can:
Or set defaults with
@…