Contentful logo

Contentful Community

Paragraph in ListItem makes it impossible to style - Rich Text

Hey guys

I got a problem with the rich text json delivered by the API. When I try to style the rich text by adding a bottom padding to a paragraph my ListItem’s also get the padding.
This happens because every ListItem text contains a paragraph.

For example, a rich text list delivered by Contentful looks like this:

  • UnorderedList
    • ListItem
      • Paragraph
    • ListItem
      • Paragraph

This makes it impossible to add padding to a paragraph because the padding also gets added to the list. The list looks awful then.

For a more visual description, see: