]> git.cworth.org Git - lmno.games/commit - scribe/scribe.css
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)
commit9d3838cf4d43ab1ed1b994b24cd3aa3cb31ebc64
tree48f603fd46f670df83b35de57d09bc3d4df25332
parent06a42682201c8bfdf8da363519be113f943fd7b8
Scribe: Fix the font size to not depend on page height

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.
scribe/scribe.css