AnubisNekhet / AnuPpuccin

Personal theme for Obsidian
GNU General Public License v3.0
2.13k stars 161 forks source link

Why do rainbow folders (full) change color while scrolling down? #290

Closed albertoloscerritos closed 3 months ago

albertoloscerritos commented 3 months ago

Hi, thanks for the great work as always. I am not sure if this is a bug, but when I enable rainbow folders, it changes the color of some folders (the first one, at least, in not changed) while scrolling down. Here are the original colors of my folders. The colors where defined using the AnuPpuccin Custom Rainbow Folder Colors snippet image And, as you can see in the following video, the "notes" folder changes color mid-way while scrolling, however the "assets" folder (the first one) remains the same color. rainbow_folders

I am using AnuPpuccin 1.5.0, the latest snippet, and obsidian 1.6.2 in windows 11.

Thanks.

SublimeAnanas commented 3 months ago

It's not a bug, because colors are assigned to folders based on their position in the navigation bar. Obsidian dynamically loads and unloads folders (and notes) based on where you scroll, causing the folders to change their position (nth-child), therefore their color as well.

As a workaround, I tried using CSS to specify certain colors for certain folder names, but due to how Obsidian's HTML is set up, it's not feasible using a theme (CSS). You would need a javascript plugin for that. (Or alternatively, for preventing Obsidian from loading-unloading items in the nav bar)

It's my biggest gripe with the theme. If anyone has a solution that I'm not mentioning, please share.

AnubisNekhet commented 3 months ago

As @SublimeAnanas said, it's simply impossible to achieve with CSS.