Typographical Line Spacing

Is it possible with current version to have line spacing? I tried hacking it with .ace_line { height: … } and .ace_line_group, but the result is not perfect/clean.

Edit: Found the right selector for it:

#note-editor {
line-height: 2.0em !important;
}

Can you explain how line spacing is controlled? Assume some users don't know CSS or html and use Joplin because it's advertised as a notetaking application.

2 Likes

I would still call it a note taking application, even if it couldn't let the user control line spacing (without html). :wink:

Of course. Just as one could have a photo editing app that would work only in black-and-white. But why would a developer do that? It would kinda limit the market adoption, wouldn't it?

Should entering

#note-editor {
line-height: 1.0em !important;
}

into userstyle.css allow us to fix the issue discussed in these threads?

Add this CSS to userstyle.css. It enforces single spaced lines and a fixed line height for HTML elements inside the parentheses. In this case, only paragraphs and lists are affected.

#rendered-md :is(p, ul, ol, li) {
  margin-bottom: 0 !important; 
  margin-top: 0 !important;
  padding-bottom: 0 !important; /* for h1 */
  line-height: 1.5em !important; /* optional */
}

To affect only paragraphs, use #rendered-md p instead. :is() isn't needed since p is the only child element.

I'd treat elements like headings (h1 to h6) and table differently than text. If leaving them alone doesn't suit you: duplicate the above CSS, select elements that need like spacing, and adjust their property values.