Don't use translate() to center formspec output.

Firefox seems to have rendering glitches and off-by-one errors when
translate() is used.
This commit is contained in:
luk3yx 2020-02-06 18:15:51 +13:00
parent 42f6b30389
commit 843d70dcef
1 changed files with 17 additions and 2 deletions

View File

@ -5,8 +5,23 @@
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="https://unpkg.com/fengari-web/dist/fengari-web.js"></script>
<script type="application/lua" src="index.lua"></script>
<style>
body {
background: #8CBAFA;
}
#formspec_output {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body style="background: #8CBAFA;">
<div id="formspec_output" style="position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);"></div>
<body>
<div id="formspec_output"></div>
</body>
</html>