Shorten classnames if they are too big