Turn string indexes of styles into integer indexes