Here is what I'm starting with:

Now I need labels to be vertical/rotated AND still participate in layout (i.e. height of the whole container should be equal to the length of the longest label):

But rotation of the labels are controlled by their containers and always reset to 0.