Browse Source

[Beta] Fix font jumps on iOS

main
Dan Abramov 2 years ago
parent
commit
a8c8a192a9
  1. 1
      beta/src/components/MDX/Sandpack/SandpackRoot.tsx
  2. 6
      beta/src/styles/sandpack.css

1
beta/src/components/MDX/Sandpack/SandpackRoot.tsx

@ -74,6 +74,7 @@ function SandpackRoot(props: SandpackProps) {
hidden: true,
};
debugger;
return (
<div className="sandpack sandpack--playground sandbox my-8">
<SandpackProvider

6
beta/src/styles/sandpack.css

@ -401,11 +401,13 @@ html.dark .sp-devtools > div {
}
/**
* For iOS: prevent browser zoom when clicking on sandbox
* For iOS: prevent browser zoom when clicking on sandbox.
* Does NOT apply to code blocks.
*/
@media screen and (max-width: 768px) {
@supports (-webkit-overflow-scrolling: touch) {
.cm-content {
.sandbox .cm-content,
.sandbox .sp-code-editor .sp-pre-placeholder {
font-size: initial;
}
.DocSearch-Input {

Loading…
Cancel
Save