Paragraphs not brealing lines as it should

I am using Frontity as the frontend of a Wordpress blog. When the text is displayed on Wordpress, it shows up normally (check screenshots here and here.

However, when it is displayed using Frontity, the paragraphs (“p”) act as simple line breaks (“br”) jumping only one line instead of two. Wordpress inserts a span at the beginning of the paragraphs (“span data-preserver-spaces=“true””) which I believed it was the cause, but even removing it manually, it does not work (screenshot here)

There are no error messages in the console. Do any of the colleagues here have an idea of what may be going on? Is it a Frontity or WP issue? Thanks in advance

URL of the post

Code repository

API

Hey @cassiano.gobbet

I have a few thoughts:

Are you using the Frontity package html2react for drawing your content from Wordpress? (https://docs.frontity.org/api-reference-1/frontity-html2react)

Is it simply a CSS styling bug? Is your react app missing some marginBottom on those

tags?

Hi, Ben. Thanks for the response. I was about to post here. I found the problem: I had a

CSS config that was nullifying the paragraph breaks:

p {
margin-top: 0.1rem;
margin-bottom: 0.1rem;
}

After deleting it, my problem was gone. Thanks again!

1 Like