Snippet: Custom CSS to hide Attachments Folder in Every Folder


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 /).

1 Like