How to do "prose prose-sm md:prose" #6103
Unanswered
danspratling
asked this question in
Help
Replies: 1 comment 2 replies
-
Hey! You just want this:
In the next version we will have a |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I've run into this weird issue where I'm trying to have smaller prose content on mobile, and the default size on other screen sizes
Looking at the docs,
prose
is a required class regardless of screen size (it adds additional things that the size modfiers don't)But because that class is required, it makes it impossible to refer to it as a size modifier when adding a media query. If I do
prose-sm md:prose
things start disappearing (like quotes) on mobileIf I wanted to use any other font size, i would use a prose size modifier
so it seems like this missing base sizing is a mistake
Suggestion
A new size modifier is added with base size styling to allow media query adjustments
workaround (edit, doesn't work)
for now, I can just manually overwrite the base font size by doing the following
But if I've customized prose so that something not accounted for by rem, like colours, are different on sm and DEFAULT in my tailwind config, there's no way I can reset them to the default without manually adjusting all styles (but with all other prose types this blanket reset is possible)
Edit: After trying this workaround I realised that it only works on base paragraph styles. Headings (h2, h3, etc) still inherit the prose-sm styles which makes them smaller on larger screens than intended
Beta Was this translation helpful? Give feedback.
All reactions