Add <meta name="viewport"> element to HTML pages

This is apparently necessary to get mobile browsers to stop doing weird
things to the font size.  But I think it will require some attention to
my CSS before the results are acceptable on tiny screens.

Thanks to Chris Siebenmann for the convenient write-up:

https://utcc.utoronto.ca/~cks/space/blog/web/HTMLViewportMess
This commit is contained in:
Ben Harris 2026-01-30 20:04:30 +00:00
parent ebe341b928
commit 0daad5fc94
2 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@
<link rel="icon" href="icon-16.png" type="image/png" sizes="16x16" />
<link rel="icon" href="icon-32.png" type="image/png" sizes="32x32" />
<link rel="icon" href="icon-64.png" type="image/png" sizes="64x64" />
<meta name="viewport" content="width=device-width initial-scale=1" />
</head>
<body>
<h1><span class="fade">Bedstead</span></h1>

View File

@ -6,6 +6,7 @@
<link rel="icon" href="icon-16.png" type="image/png" sizes="16x16" />
<link rel="icon" href="icon-32.png" type="image/png" sizes="32x32" />
<link rel="icon" href="icon-64.png" type="image/png" sizes="64x64" />
<meta name="viewport" content="width=device-width initial-scale=1" />
<style>
:root {
--pix: 7vmin;