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?

Joplin increases line spacing for various elements with margins and padding. You may want tighter spacing whether you use Markdown or Rich Text.

Pressing Shift+Enter tightens Rich Text line spacing on desktop and mobile, but it can become cumbersome.

A desktop workaround is to add this CSS template to userstyle.css, then modify it to your needs:

/* duplicate rule with different HTML tags and declarations as needed */
#rendered-md :is(p /* modify tags as needed */) {
  /* modify declarations below as needed */
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  padding-bottom: 0 !important;
  padding-top: 0 !important;
  line-height: 1.3em !important; /* Joplin default, change as needed */
}

For example, I use this CSS to set single line spacing for paragraphs and lists:

#rendered-md :is(p, ul, ol, li) {
  margin-bottom: 0 !important;
  line-height: 1.5em !important;
}

#rendered-md :is(ul, ol) {
  margin-top: 0 !important;
}

I find spacing for other elements (such as headings, tables, and horizontal rules) suitable, but you can adjust them as needed.

Back to the issue, would a toggle between single and double spacing when pressing Enter help?