How to have current state class apply to sub pages

any solutions?
I also tried using this: Current pseudo classes on sub pages - #7 by samliew

but that just made things messy once the user switched tabs to library page.

thanks