First header has unproportinal margin with frontmatter present and no title

Steps to reproduce

  1. Open a new File and put a frontmatter in it. Doesnt even need to contain anything.
  2. Put a header on top of the document.
  3. Put “Properties in document” on hidden.
  4. Deactive showing title of the note inside of the note.
  5. Inspect the margin of the header. It is unproportional. The top margin is way bigger than the bottom one.

Did you follow the troubleshooting guide? [Y/N]


Expected result

The margin should at least be the same height on top and bottom. It is that way if there is no frontmatter-section present.
Or even better: The top margin not beeing there. This is the behaviour of the “show title in note” feature.

Actual result

Top margin is bigger than bottom margin.


Obsidian version: v1.5.3
Installer version: v1.5.3
Operating system: #1 SMP PREEMPT_DYNAMIC Sun, 21 Jan 2024 22:14:10 +0000 6.7.1-arch1-1
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on


Additional information

For the debug-information i used the sandbox-vault and deactivated showing the title in the note and put “Properties in document” on hidden.

Here is an image how it looks without the frontmatter:

Here is an image how it looks with frontmatter:

And here is an image of the margins when there is the title in note feature activated:

Yes. I have suggested that as well here although it should be a separate post describing a new CSS variable “first heading top margin”.

Where did you suggest that, have I missed the post?


Does that behavior persist with the default theme and restricted mode turned on?

In my experience, the Typewriter Scroll plugin produces huge gaps between front matter and the note’s content (whether there’s a header at the top or not).

I switched to the newer Typewriter Mode plugin, which fixed the problem.

Yes this happens with the default Theme and also the default Sandbox-Vault. No external plugins are enabled.