Steps to reproduce
- Create note
- Add properties/frontmatter to note
- Create link to note (ex.
[[note_name]]
) - Ctrl + hover (default configuration) on the link to trigger page preview
- 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.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;
}