Need help with the distance between the headers and text using minimal theme

Hi all,

I am busy creating a document for my boss who is adamant I use obsidian and minimal theme. The issue I ran into is that when I go to preview mod the spacing between my headers and follow-up text is massive (specifically only in preview mode). My goal is to change the distance to a similar size as what you see in edit mode.

I have tried using the “style settings” plugin but that seems to just hang my obsidian for whatever reason

I have read the Huge spacing between headers and text thread and copied gregp’s snippit but it only seems to change the edit mode. I even tried to mess with the numbers to no avail.

As well as: How to remove margin after/below list heading? but I did not even see a difference.

Thank you all in advance and sorry if I made a mistake in this post. :slight_smile:

If you are using Obsidian v1.3.7+, there are some new theme variables to play with having to do with spacing. They work as is with Minimal.

You’ll see a change of --p-spacing in both editing and reading modes, and --heading-spacing only in reading mode.

/* default vaules */
/*body {
    --p-spacing: 1rem;
    --heading-spacing: calc(var(--p-spacing) * 2.5);

body {
    --p-spacing: 1rem;
    --heading-spacing: calc(var(--p-spacing) * 1);

You could give those a try (adjusting the values as you like). You can get more specific with only adjusting reading mode, but maybe a screenshot or two with with annotations, arrows, etc., of both modes would help here showing exactly what you are going for.

1 Like

Thank you Ariehen!

I feel a little stupid that the solution is so simple, but this is exactly what I needed!

Nothing to feel stupid about. :smiling_face:

Glad it worked out. :sweat_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.