Skip to content

Commit 704a15e

Browse files
authored
remove spacing around the preview iframe
This is so that examples can use the whole iframe. Otherwise, if a playground has code like ```js document.querySelector('head').innerHTML += `<style> html, body, #app { width: 100%; height: 100%; padding: 0; } </style>`; ``` then an amount of content (equal to the padding) will stick beyond the bottom edge of the preview. The `block` display prevents vertical displacement due to some font configurations for inline-block elements, and we're not rendering the canvas within text.
1 parent fd2b3f6 commit 704a15e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export const Preview: Component<Props> = (props) => {
203203
>
204204
<iframe
205205
title="Solid REPL"
206-
class="overflow-auto p-2 w-full h-full dark:bg-other"
206+
class="overflow-auto p-0 w-full h-full dark:bg-other block"
207207
ref={iframe}
208208
// @ts-ignore
209209
sandbox="allow-popups-to-escape-sandbox allow-scripts allow-popups allow-forms allow-pointer-lock allow-top-navigation allow-modals allow-same-origin"

0 commit comments

Comments
 (0)