Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Gap between banner and content of the note #173

Open
ElsaTam opened this issue Nov 27, 2024 · 0 comments
Open

[Fix] Gap between banner and content of the note #173

ElsaTam opened this issue Nov 27, 2024 · 0 comments

Comments

@ElsaTam
Copy link

ElsaTam commented Nov 27, 2024

Hi!

This plugin is great and has a lot of users. I have seen a lot of people asking for a way to remove the gap between the banner and the content, as well as hiding the metadata that can sometimes appear underneath the banner.

Solution 1: One simple solution is to set the properties visibility to "Hidden" (Settings > Editor > Display > Properties in document) in your whole vault.

Solution 2: If you want to hide the properties under the banner but keep them visible where you don't have a banner, I have made a CSS snippet that should fix it.

body {
    --banner-gap: 0px;
}

/* Remove meta data */
.markdown-preview-view:has(.obsidian-banner-wrapper) {
    --metadata-display-reading: none;
}

/* Remove title */
.markdown-preview-view:has(.obsidian-banner-wrapper) .inline-title {
    display: none;
}

/* Adjust height by taking into account file margins */
.markdown-preview-view:has(.obsidian-banner-wrapper) .obsidian-banner-wrapper {
    font-size: 0;
    margin-top: calc(var(--banner-height) - var(--file-margins) + var(--banner-gap));
}

Solution 3: If you want to keep the properties of the note visible just under the banner, someone made another solution here: #157 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant