mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
[egui_web] Add max canvas size to help perf issues on some platforms
Related: https://github.com/emilk/egui/issues/67
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
}
|
||||
|
||||
body {
|
||||
background: #101010;
|
||||
background: #202020;
|
||||
}
|
||||
|
||||
/* Allow canvas to fill entire web page: */
|
||||
@@ -24,6 +24,17 @@
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/* Center canvas vertically and horizontally: */
|
||||
canvas {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user