Css code need to add space between paragraphs, for paragraphs with no extra blank line between them

What I’m trying to do

I’m trying to use the frontmatter cssclass to format certain files. I’ve removed the extra blank line at the end of each paragraph and I need to create space between the paragraphs with css code. I’ve achieved this in the edit view, but I can’t figure out how to do in the reading view. The edit view is the important one, but it would be nice if it worked in reading view too. I have tried many things to achieve this in reading view, but my understanding of css is limited so I was mostly trying things at random.

Here’s my front matter:

cssclass: linespacing

My snippet is titled ‘linespacing.css’ and here is the code I have in that file that works for the edit view:

.markdown-source-view.linespacing .cm-line { 
   padding-bottom: 1.25em; 
}

This code does works for the edit view. The problem is I need a similar code for the reading view.

And just to be clear, I’m trying to create space between the paragraphs. And the paragraphs do not have the extra blank line between them.

thanks

1 Like

This seems to work in local tests:

Obsidian > Settings > Editor > Strict line breaks > toggled OFF

```css
.markdown-preview-view.linespacing br {
  content: '';
  display: block;
  margin-top: 1.25em;
}
```
1 Like

Thank you very much. I spent all last night trying to figure this out. This did work.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.