From 0ca31218526ea2e6656a79b836474ac291be2358 Mon Sep 17 00:00:00 2001 From: Reinder Nijhoff Date: Wed, 8 May 2024 11:59:22 +0200 Subject: [PATCH] set default style values for canvas (inset 0, display block) --- src/lib/RendererInstance.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/RendererInstance.ts b/src/lib/RendererInstance.ts index a3b74b6..c3d2fee 100644 --- a/src/lib/RendererInstance.ts +++ b/src/lib/RendererInstance.ts @@ -41,8 +41,11 @@ export class RendererInstance extends Renderer { } else { this.canvas = this.gl.canvas; } + this.canvas.style.inset = `0`; this.canvas.style.width = `100%`; this.canvas.style.height = `100%`; + this.canvas.style.margin = `0`; + this.canvas.style.display = `block`; this.container.appendChild(this.canvas);