Ensure that custom classes are applied before the tooltip's size is determined

If a custom class changes the size of a tooltip, you won't know until it's too late.