Merge pull request #1994 from Skwodo/master

fix overflow-x on mobile
This commit is contained in:
Eric Huss 2023-02-08 15:37:53 -08:00 committed by GitHub
commit e352e4f59c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,19 @@ a > .hljs {
color: var(--links); color: var(--links);
} }
/*
body-container is necessary because mobile browsers don't seem to like
overflow-x on the body tag when there is a <meta name="viewport"> tag.
*/
#body-container {
/*
This is used when the sidebar pushes the body content off the side of
the screen on small screens. Without it, dragging on mobile Safari
will want to reposition the viewport in a weird way.
*/
overflow-x: hidden;
}
/* Menu Bar */ /* Menu Bar */
#menu-bar, #menu-bar,

View File

@ -54,6 +54,7 @@
{{/if}} {{/if}}
</head> </head>
<body> <body>
<div id="body-container">
<!-- Provide site root to javascript --> <!-- Provide site root to javascript -->
<script> <script>
var path_to_root = "{{ path_to_root }}"; var path_to_root = "{{ path_to_root }}";
@ -309,5 +310,6 @@
{{/if}} {{/if}}
{{/if}} {{/if}}
</div>
</body> </body>
</html> </html>