You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the @tailwindcss/typography plugin uses CSS variables for colors, which are swapped out when prose-invert is used.
But, it would be very helpful if more CSS variables were used so that these values could also be re-used in other styles.
For example, in my MDX files, I sometimes use a block which gets a .note class. It should be styled as a block, and I would like it to have the same margins as other common blocks get from prose. Looking at the styles for blockquote, it seems to end up as 1.6em, but I'm not entirely sure, and either way when I hard-code 1.6em it would not get updated if the typography plugin adjusts it in the future. I'm also unsure whether the blockquote margin is "standard", or whether I should've used a different one.
Another example is that I have some elements I'd like to have the same max-width as .prose, which currently seems to be 65ch. This as well, would be great if it was available as a CSS variable, preferably on :root so it could be used anywhere, not just for children of .prose.
Of course, it would probably get very messy if all values were to be defined as CSS variables... but, it would still be helpful if a handful of common ones could be made available.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently the
@tailwindcss/typography
plugin uses CSS variables for colors, which are swapped out whenprose-invert
is used.But, it would be very helpful if more CSS variables were used so that these values could also be re-used in other styles.
For example, in my MDX files, I sometimes use a block which gets a
.note
class. It should be styled as a block, and I would like it to have the same margins as other common blocks get fromprose
. Looking at the styles for blockquote, it seems to end up as1.6em
, but I'm not entirely sure, and either way when I hard-code1.6em
it would not get updated if the typography plugin adjusts it in the future. I'm also unsure whether the blockquote margin is "standard", or whether I should've used a different one.Another example is that I have some elements I'd like to have the same max-width as
.prose
, which currently seems to be65ch
. This as well, would be great if it was available as a CSS variable, preferably on:root
so it could be used anywhere, not just for children of.prose
.Of course, it would probably get very messy if all values were to be defined as CSS variables... but, it would still be helpful if a handful of common ones could be made available.
Beta Was this translation helpful? Give feedback.
All reactions