More complete implementation of style resolution.