Browse Source

Allow page zooming/scaling (#4082)

* Allow page zooming/scaling

* Fix for iOS
main
Alexey Pyltsyn 3 years ago
committed by GitHub
parent
commit
719aa3c377
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      beta/src/components/Seo.tsx
  2. 9
      beta/src/styles/sandpack.css

2
beta/src/components/Seo.tsx

@ -27,7 +27,7 @@ export const Seo = withRouter(
<meta <meta
name="viewport" name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" content="width=device-width, initial-scale=1"
/> />
{title != null && <title key="title">{title}</title>} {title != null && <title key="title">{title}</title>}

9
beta/src/styles/sandpack.css

@ -191,3 +191,12 @@ html.dark .sp-loading {
padding-left: var(--sp-space-1) !important; padding-left: var(--sp-space-1) !important;
padding-right: var(--sp-space-1) !important; padding-right: var(--sp-space-1) !important;
} }
/* For iOS: prevent browser zoom when clicking on sandbox. */
@media screen and (max-width: 768px) {
@supports (-webkit-overflow-scrolling: touch) {
.cm-content {
font-size: initial;
}
}
}

Loading…
Cancel
Save