Is there a pure CSS way to adjust styling of an element where its only child does not have a class?

For example:

```
<a><img class="avatar pro"></a>
<a><img class="avatar"></a>

```

And I only want to style "a" containing a child with the class "pro"?

Background is the following:
In Buddypress, you have a hook to add a class for avatars:

```
add_filter( 'bp_core_avatar_class', 'filter_bp_core_avatar_class', 10, 4 );

```

However, since :before / :after-pseudo-classes do not work on images, I need to be able to adjust the wrapping container.

Thanks!
Raphael