Title color instead background

What I’m trying to do

I’m trying to change the text color of folder, subfolders and items from a certain folder.

Things I have tried

.nav-folder.mod-root > .nav-folder-children > .nav-folder:nth-child(9n+2) {
background-color: var(–Fold0);

This works really as I want BUT I just want to change the names of the folders and items, instead the background. I’ve tried to use “color” instead “background-color” but doesn’t work at all.

.nav-file>.nav-file-title[data-path^=“0”] {

This one works really well, but I have to define the title and I would like that this doesn’t depend of the folder name, but position.

I also have checked the Iterative Rainbow folder, and it’s similar to what I want. But I want that every item inside the first level folder uses the same color as the main level. For example:

  • Folder A (color red)
    Subfolders and items in A (color red)
  • Folder B (color green)
    Subfolders and items in B (color green)

And so on.

You could try adding the wildcard * to end of your first snippet and duplicating it. That seems to apply color down through everything.

.nav-folder.mod-root > .nav-folder-children > .nav-folder:nth-child(9n+2) * {
    color: red;

.nav-folder.mod-root > .nav-folder-children > .nav-folder:nth-child(9n+3) * {
    color: green;

.nav-folder.mod-root > .nav-folder-children > .nav-folder:nth-child(9n+4) * {
    color: orange;

1 Like

Thank you! This works exactly like I expected! I’m sorry for my poor explanation, I have no knowledge of the subject and English is not my native language.
Have a great day!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.