Made style application code aware of pseudo-classes