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
Hellowith tailwind, it looks like
HelloWorld
How can I do to write markdown without tailwind overriding the default markdown spacing?
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.