I'm not sure if there is a single 'proper' way; my preferred method is to just add a top padding, because the arithmetic is easier.
So in your example (height 32px) if I add 8px top padding, then I reduce the height of the container by 8px = 24px.
You can play with it to get the right numbers, but at least the maths makes sense.