apply correct order rules for styling link states