I found out how to do it.
.foo:nth-of-type(1) .bar:nth-of-type(3), .foo:nth-of-type(2) .bar:nth-of-type(2) { color:yellow; }