Snippet: Custom CSS to hide Attachments Folder in Every Folder

Hello,

I was looking for a way to fix the following issue:

Turns out it is possible to select an attribute if it contains some text by using the ‘*=’ trick.

div[data-path*='assets'], div[data-path*='assets'] + div.nav-folder-children 
{
    display: none;
}

That will hide any folder or sub-folder named ‘assets’.
You can also mimic dot-files behavior by using [data-path*='/_'] and all files beginning with _ instead of a dot will be hidden (won’t work in the root dir though because of the missing /).

5 Likes

Nice. I have some “maintenance” folders, and now I can Hide them. :+1:

this useful
Now I can hide some folders and reduce distraction due to the large number of folders

IDK when this plugin was introduced, but community plugin “Hide Folders” does what you want.

Has a button on the sidebar to toggle on/off. It seems to fill the bill! THANK YOU @JonasDoesThings!

obsidian://show-plugin?id=hide-folders