Is it possible to design a flexible CSS grid layout with two cells that can switch between stacking vertically or horizontally to maximize the area of the second cell? (or similar heuristic)
Ideally, the menu cell should have dimensions set to (min-content, min-content), and the body cell should be either (auto, 100%) or (100%, auto) for horizontal and vertical layouts respectively. My main challenges are figuring out how to: 1. Implement this behavior using CSS grids, and 2. Use CSS to determine whether to display the horizontal or vertical layout based on the area of the body cell.