From 7a710ee5dcfe327bfb590e134138b94c38f53a95 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Thu, 3 Dec 2020 21:19:33 -0700 Subject: [PATCH] Fix editor canvas centering in Chrome --- style.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/style.css b/style.css index 3a09c74..887d44b 100644 --- a/style.css +++ b/style.css @@ -944,15 +944,16 @@ main.--has-demo .demo-controls { overflow: auto; /* Flex layout to center the canvas and overlay together */ display: flex; - align-items: center; - justify-content: center; + /* This isn't supported in Chrome (still!!), so use auto margins on the child instead align-items: safe center; justify-content: safe center; + */ background: #202020; border: 0.125em solid black; } #editor .editor-canvas .-container { position: relative; + margin: auto; /* Give the canvas/overlay a bit of a margin; it has to be a border because, due to some quirk * of overflowing flexboxes I guess, padding and margins won't extend the scroll area on the * right and bottom */