Spent 30 minutes trying to center a div vertically and i finally gave up
Ah, I didn't know that there are two child elements. Your best solution then would be these styles in the parent:
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
It's definitely the cleanest way if you don't want to take elements out of the layout flow :)