Parent AND subfolder icon color

Hi all. css question here. i’m using Iconize to add folder icons, and have a simple css snippet to target and specify the svg color of specific icons, so:

.nav-folder [data-path="smith"] > .iconize-icon svg {
color: whatever;
}

i’m trying to get the css right to make all the subfolder icons in that ‘smith’ folder the same color as well. i’ve tried a bunch of things, and searched this and other forums but the only things i can find target the top level folder icon only.

can someone help me with this? i’m feeling rather dumb.

You can try using the “begins with” selector ^=.

e.g.:

.nav-folder [data-path^="smith"] > .iconize-icon svg {
color: whatever;
}

A nice reference of CSS selectors can be found here: