I'm creating a board game where I want to display a board of square fields that always fit in 100% of the screen's height and/ore width (scrollbar should never appear), so it should be responsible both vertically and horizontally. Number of rows and columns is dynamic.
Additionally the board should change it's orientation depending if there's more rows or columns to display. A little overview in images on what I'm trying to achieve:
Horizontal orientation (big screen):
Horizontal orientation (small screen):
I suppose if I get knowledge how to make either fully responsive, the other orientation won't be a problem.
Here's snippet of my code structure which is pretty standard as you might expect (Angular-generated):
The solutions I tried to use like these http://bluecaret.com/blog/responsive-grid-of-squares are inadequate and insufficient for me. The grid either doesn't span properly to the screen width/height (these vw / vh numbers really don't make sense to me) or is well responsive only in one direction.
I'm open to advices with use of flex / bootstrap / plain CSS.
This is the first issue I failed to solve in CSS in unlimited amount of time.. :|