Skip to content

Commit

Permalink
Merge pull request #1994 from Skwodo/master
Browse files Browse the repository at this point in the history
fix overflow-x on mobile
  • Loading branch information
ehuss authored Feb 8, 2023
2 parents 0e1384b + 734936d commit e352e4f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/theme/css/chrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ a > .hljs {
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,
Expand Down
2 changes: 2 additions & 0 deletions src/theme/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
{{/if}}
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script>
var path_to_root = "{{ path_to_root }}";
Expand Down Expand Up @@ -309,5 +310,6 @@
{{/if}}
{{/if}}

</div>
</body>
</html>

0 comments on commit e352e4f

Please sign in to comment.