Page preview has blank space when document has frontmatter

Steps to reproduce

  1. Create note
  2. Add properties/frontmatter to note
  3. Create link to note (ex. [[note_name]])
  4. Ctrl + hover (default configuration) on the link to trigger page preview
  5. Page preview has blank space at beginning

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

Expected result

No extra blank space at the top of the preview

Actual result

Blank space is seen at the top of the preview

Environment

SYSTEM INFO:
	Obsidian version: v1.6.5
	Installer version: v1.6.5
	Operating system: Windows 11 Pro 10.0.22631
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Additional information

With frontmatter
Without frontmatter

with.md

---
key: value
---
# Example

without.md

# Example

This is due to the .popover.hover-popover > .markdown-embed .mod-header + div > *:first-child selector which sets margin-top: 0. However, the first-child selected here is the frontmatter with display: none; and therefore has no effect. If we use the below snipped the issue is fixed.

.popover.hover-popover > .markdown-embed div > *:not([style*="display: none"]) {
    margin-top: 0 !important;
}