]> git.cworth.org Git - lmno.games/commitdiff
Scribe: Fix the font size to not depend on page height
authorCarl Worth <cworth@cworth.org>
Sun, 7 Jun 2020 00:16:08 +0000 (17:16 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 7 Jun 2020 00:16:08 +0000 (17:16 -0700)
The height of the game board is already fixed based on the viewport
width, (to mtain a square asepct ratio). The use of 'vmin' in the font
size led to a weird result where shrinking the page height left the
board size untouched but the text-based game-play components would
shrink, which was undesirable.

The fix for that here is to simply switch from 'vmin' to 'vw' so the
font size depends only on the page width, not the height.

While exploring the issue described above, I found that making the
page _extremely_ wide also caused the fonts to grow excessively and
make the board spill out over the page margin. To avoid that, we cap
the font size with a calculation based on the maximum page width. This
takes advantage of a variable introduced in the previous commit.


No differences found