1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Fix web blur (#151)

* [egui_web] Always use an even canvas size

Fixes https://github.com/emilk/egui/issues/103

* [egui_web] Position canvas at top of screen

This avoids jumpyness when resizing,
caused by rounding height to an even number
This commit is contained in:
Emil Ernerfeldt
2021-02-01 20:44:39 +01:00
committed by GitHub
parent 2cbea02c8b
commit 0f33bc7c34
2 changed files with 20 additions and 7 deletions

View File

@@ -27,15 +27,15 @@
padding: 0 !important;
}
/* Center canvas vertically and horizontally: */
/* Position canvas in center-top: */
canvas {
margin-right: auto;
margin-left: auto;
display: block;
position: absolute;
top: 50%;
top: 0%;
left: 50%;
transform: translate(-50%, -50%);
transform: translate(-50%, 0%);
}
</style>
</head>