Indent the first line in each paragraph in Preview Mode

The ::first-line solution by @aroberge is almost right.
As @NilsHempel points out, you generally don’t want to intent the first paragraph after a heading.

Unfortunately, the simple p + p selector doesn’t work because of the way Obsidian presents the view. Here is a screenshot showing dev tools. Note every section is inside a div element so there doesn’t seem to be a CSS selector powerful enough to match each paragraph.

Are there any CSS wizards out there who know how to properly select paragraphs which are nested inside divs like this?

image

1 Like