DEV Community

Cosimo Streppone
Cosimo Streppone

Posted on • Originally published at streppone.it on

TIL: Styling Obsidian text paragraphs

TIL that it’s possible to style Obsidian text paragraphs in a way that allows me to focus on the actual text content and not on the fact that I need to add an artificial line break every time I type a paragraph :-)

Obsidian can use CSS snippets to style the application itself and the text/markdown content. The CSS snippets need to be saved in <vault_directory>/snippets/whatever.css.

This is how to get that “natural” book-like spacing between paragraphs, and avoid adding spurious line breaks in the markdown code:

.cm-contentContainer {
  line-height: 1.70rem;
}

.markdown-source-view.mod-cm6 .cm-content > .cm-line {  
  padding-bottom: 12px !important;  
}
Enter fullscreen mode Exit fullscreen mode

Of course, the values for main line-height and padding will depend on your particular screen and font settings. In my case I use a screen tilted in vertical position for writing and coding, and my font of choice is the beautiful Berkeley Graphics’s Berkeley Mono.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay