On my wiki we have this standard navbox, Template:Navbox group, which we use as the base template for other navboxes, like Template:Character Navbox EE.
The base template is a bit complex and I don't really know how it works too well. What I'm trying to do is making its colors toggle according to the light/dark theme using CSS classes ("navbox-header" and "navbox-background"). As you can see on Template:Character Navbox EE, it's almost there, but I don't know how to target the "title" section with the class "navbox-header". Could someone please help me here?