Indenting paragraphs (and paragraphs only) in source mode

Hello all,

I have been trying to figure out how to indent paragraphs in source and preview modes, and I am almost there… But I am not quite getting the result I would like. Could anybody point me to the right direction?

I’m trying to have only text paragraphs indented, not lists nor headers. I’m currently using

.cm-s-obsidian, .markdown-preview-section p
{
  text-indent: 40px;
}

Which works almost fine in preview mode:

Is there a way to indent only p and not titles? Couldn’t find how.

It does work in preview mode…

… unfortunately, paragraphs which follow without line breaks are not recognized as being separate. There does not seem to be a current answer for this.

1 Like

Have you tried to fix the titles indent individually? changing the left margin…
Probably the fold gutter will stop working but it should do the job.

Edit: I test here and happened exactly what I said
image

1 Like

Duh! I should definitely have thought of that.
Strangely enough, though, I’ve tried it with a negative text-indent but that only works in preview mode… A possible formatting bug? (Tagging @WhiteNoise just in case…)

I was however wondering if there was a specific selector for paragraphs themselves in preview mode. Would allow for more flexibility instead of having to undo the formatting in all six headers. If not, at least that’s a solution, thanks. :slight_smile: