fix: make canvas visible

- automate editor background handling
This commit is contained in:
Felix Roos 2023-12-14 23:00:18 +01:00
parent d23cac506c
commit 29082808cb
2 changed files with 6 additions and 1 deletions

View File

@ -150,6 +150,11 @@ export class StrudelMirror {
onEvaluate: () => this.evaluate(), onEvaluate: () => this.evaluate(),
onStop: () => this.stop(), onStop: () => this.stop(),
}); });
const cmEditor = this.root.querySelector('.cm-editor');
if (cmEditor) {
this.root.style.backgroundColor = 'var(--background)';
cmEditor.style.backgroundColor = 'transparent';
}
} }
async drawFirstFrame() { async drawFirstFrame() {
if (!this.onDraw) { if (!this.onDraw) {

View File

@ -7,7 +7,7 @@ import HeadCommonNew from '../../components/HeadCommonNew.astro';
<HeadCommonNew /> <HeadCommonNew />
<title>Strudel Vanilla REPL</title> <title>Strudel Vanilla REPL</title>
</head> </head>
<body class="h-app-height bg-background"> <body class="h-app-height">
<div class="settings"> <div class="settings">
<form name="settings" class="flex flex-col space-y-1 bg-[#00000080]"> <form name="settings" class="flex flex-col space-y-1 bg-[#00000080]">
<label <label