Further help with line spacing in Edit Mode

Things I have tried

I got help in this thread: Paragraph formatting in editor? - Help - Obsidian Forum

I added the following code to my Options > Appearance > CSS Snippets:

.CodeMirror pre.CodeMirror-line {
  padding-bottom: 15px;
}

BTW I am only interested in Edit Mode. I generally never use preview mode.

This fixed the problem I was trying to solve, and introduced many new ones. Now everything has extra line spacing, including lists and headers.

After about 2 hours of floundering over the last several days, I have made no progress at all in finding snippets or anything I can make sense out of to adapt my own solution.

What I’m trying to do

I just need to see paragraphs clearly without hitting enter 2x for every paragraph break, which will cause problems later in my workflow. That’s it. I just want any kind of traditional way to see single paragraph breaks WITHOUT ADDING EXTRA SPACE TO THINGS THAT ARE NOT PARAGRAPHS, e.g. headings, lists, etc

So I would like help accomplishing one of the following:

  1. Just change the vertical padding to a first-line indent for paragraphs so that vertical spacing is unaffected.
  2. Individually fix all lists and headers so that there is not a lot of extra vertical space
2 Likes

Okay I found this thread: How to make list indents deeper in editor mode?

from which I derived this code:

.cm-s-obsidian pre.HyperMD-list-line {
  padding-bottom: 0px !important;
}

So it seems that fixes my problems with lists.

If I can just figure out headings I will have advanced all the way to zero LOL.

FTR this is my final CSS Snippets file:

.CodeMirror pre.CodeMirror-line {
  padding-bottom: 15px;
}

.cm-s-obsidian pre.HyperMD-list-line {
  padding-bottom: 0px !important;
}
  
.cm-s-obsidian pre.HyperMD-header{
  padding-bottom: 0px !important;
}

This is everything that is needed to:

  1. Add line spacing to every paragraph
  2. Remove that spacing from lists
  3. Remove spacing from headers

I.e. normal text if you are writing text.

3 Likes

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