There is no value for > for css specificity.
Both cases have a value of 11 for specificity:
.foo > a { color:green; } .bar a { color:red; }
In your case, you can use, like this, for more specifics:
.bar .foo > a { color:green; } .foo a { color:red; }
Ok, I'm going to add here how specificity works:
Selector Specificity Specificity in large base inline-style 1 0 0 0 1000 id selector 0 1 0 0 100 class,pseudo,attribute selector 0 0 1 0 10 type selector and pseudo elements 0 0 0 1 1
source share