Home > Web Front-end > CSS Tutorial > TIL: Styling Obsidian text paragraphs

TIL: Styling Obsidian text paragraphs

Linda Hamilton
Release: 2025-01-04 15:38:39
Original
603 people have browsed it

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 /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;  
}
Copy after login

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.

The above is the detailed content of TIL: Styling Obsidian text paragraphs. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template