Tidy up builder preview iframe

This commit is contained in:
Andrew Kingston 2020-12-08 10:16:01 +00:00
parent 5130bdf3cd
commit fd207af6ad
2 changed files with 7 additions and 12 deletions

View File

@ -69,13 +69,11 @@
</script> </script>
<div class="component-container"> <div class="component-container">
{#if $currentAsset} <iframe
<iframe style="height: 100%; width: 100%"
style="height: 100%; width: 100%" title="componentPreview"
title="componentPreview" bind:this={iframe}
bind:this={iframe} srcdoc={iframeTemplate} />
srcdoc={iframeTemplate} />
{/if}
</div> </div>
<style> <style>

View File

@ -1,12 +1,11 @@
<html> <html>
<head> <head>
<link rel="stylesheet" href="https://rsms.me/inter/inter.css"> <link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Mono">
<style> <style>
body, html { body, html {
height: 100% !important; height: 100% !important;
font-family: Inter !important; font-family: Inter, sans-serif !important;
margin: 0px !important; margin: 0 !important;
} }
*, *:before, *:after { *, *:before, *:after {
box-sizing: border-box; box-sizing: border-box;
@ -35,8 +34,6 @@
} }
} }
let selectedComponentStyle
// Ignore clicks // Ignore clicks
["click", "mousedown"].forEach(type => { ["click", "mousedown"].forEach(type => {
document.addEventListener(type, function(e) { document.addEventListener(type, function(e) {