xpgo / obsidian-folder-note-plugin

Plugin to add description note to a folder for Obsidian.
379 stars 27 forks source link

[Bug] Folder name disappears with Red Graphite theme in light mode #77

Open MichelleCCHo opened 1 year ago

MichelleCCHo commented 1 year ago

I'm using the red graphite theme in light mode. The folder name disappears after creating a folder note. See pictures below. The problem seems to be that when the folder note is created, the folder name font becomes bolded and the color becomes that of the sidebar background. Could you fix the css such that it becomes bolded in the white color for the themes that have a darker color in the light mode. Thanks!

Screen Shot 2023-04-05 at 2 08 49 PM Screen Shot 2023-04-05 at 2 08 45 PM
aToTheKi commented 5 months ago

@MichelleCCHo Hopefully you've found a way around this issue since a year ago, but if not (and also for anyone else having this happen)—

You can use a CSS snippet which should fix the issue when using the Red Graphite theme—just create a text file (outside of Obsidian) and paste this in there:

div.has-folder-note {
  color: var(--color-base-40);
}

And save it as something like "Red-graphite-has-folder-note-fixer.css" inside your "Obsidian Vault/.obsidian/snippets" folder. (Again, has to be done outside of the Obsidian app).

Then in Obsidian, go to Settings / Appearance and on the bottom when you switch on the snippet you just made, the folder names in the Navigation tree should magically reappear! (If not, might need to close & reopen Obsidian).

And then if you wanted to use a different theme other than Red Graphite, you can just switch that off again if needed.


Note, the number in "--color-base-[ ]" controls how bright/dark the text is …

"--color-base-40" is the same color as the rest of the Nav tree (, whether there's a folder note inside or not.

If you'd prefer that it be brighter/emphasized when there's a folder note inside, you can change that to 30, 20, or 10—e.g. "color: var(--color-base-10)" will be nearly white, instead of the default light grey color.

In fact you can make one snippet with the default nav tree color for folder names, and another with the brighter color, and choose between the two just to switch things up every now and then :D

I've attached a zip file with two CSS files that can be used as snippets, one is the default text color and the other is the brighter one, they can be dropped into "Obsidian Vault/.obsidian/snippets" as mentioned above. Hope that helps!

Red-Graphite-has-folder-note-fixer_CSS_files.zip