Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to stop tailwind from overriding markdown default spacing?

I'm writing a blog using eleventy (with nunjucks) and tailwind.

Whenever I write a post using markdown and disabling tailwind, everything is fine. but when I enable tailwind, the line break (2-space and enter at end of line) stops working, so everything looks like one big paragraph. In other words:

without tailwind, this paragraph (in markdown)

Hello  

World

looks like this

Hello

World

with tailwind, it looks like

Hello

World

How can I do to write markdown without tailwind overriding the default markdown spacing?

like image 965
ihojmanb Avatar asked Oct 20 '25 13:10

ihojmanb


1 Answers

So I finally got with a solution. Tailwind has a plugin called 'typography'. Once you install it, add prose as a class to the parent element of the markdown content. This is a built-in tailwind class that will help you default settings of spacing, font, color.

like image 50
ihojmanb Avatar answered Oct 23 '25 03:10

ihojmanb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!