Add setting to collapse / fold Properties across all notes by default

I just installed this CSS as a snippet, and it does exactly what I wanted. It keeps the properties out of the way but doesn’t outright disable them in case I need to reference them.

This is one of the things I like so much about Obsidian. If something isn’t quite to your liking, there’s a good chance someone has already written a plugin or snippet to tweak it.

1 Like

Just added the custom CSS myself, great work around.

Would still prefer a native option in Obsidian for this, I’m sure others also do.

BUMP

I’d love to use this plugin: auto folds the properties by default in source view upon opening a note: Fold Properties By Default by @tbergeron (GitHub page)

Also see Properties visibility on a per-note basis? - Feature requests - Obsidian Forum.

You can use the cssclasses property to give any note a CSS class. Then target that CSS class to hide the properties in that note.

Been meaning to give the plugin a try after using this CSS Snippet for over a year now but didn’t want to install another plugin :smile:


/* Hide Properties and show on Hover */
.markdown-preview-view, .markdown-source-view { /* Both edit and preview mode */
    .metadata-container {             
        max-height: 2.7rem;             
        opacity: 0.6;             
        overflow: hidden;             
        transition: max-height 250ms ease-in-out, opacity 250ms;
        margin-bottom: 0;         
    }
    .metadata-container:hover,
    .metadata-container:focus-within {
         max-height: 1000px;
         opacity: 1;
         transition: max-height 300ms ease-in-out, opacity 300ms;         
    }
}