The problem is simple:
- The main part of my page is a square that should be shown at the center of the screen in all screen sizes and orientations
- The square should use the screen efficiently and be as big as possible without the need to scroll
- No scrollbars, no fixed sizing, no overflow-hidden, no Javascript.
- Flexbox is encouraged.
This is how the page should look like in a landscape or portrait browser:
Here is a CodePen as a starting point.
<div class="body">
<div class="square">
Square
</div>
</div>