Browse Source

Platform: improve the UX of windowless Emscripten apps.

* Wrap the text like in a console because nobody wants to read
   kilometers-long horizontal lines with a horizontal scrollbar
 * Make the output fill at least the space given to it but let it expand
   beyond because a vertical scrollbar in an area of this size is
   useless as well.
pull/364/head
Vladimír Vondruš 7 years ago
parent
commit
e9286421a1
  1. 8
      src/Magnum/Platform/WebApplication.css

8
src/Magnum/Platform/WebApplication.css

@ -112,12 +112,12 @@ body {
#canvas, pre#log {
max-width: 100%;
width: 100%;
height: 100%;
z-index: 10;
border-radius: 0.2rem; /*var(--border-radius)*/
}
#canvas:focus { outline-color: #5b9dd9; } /*var(--header-link-current-color)*/
#canvas {
height: 100%;
margin-bottom: -0.25rem; /* otherwise there's scrollbar w/ fullsize (why?) */
}
#status, #status-description {
@ -140,8 +140,12 @@ body {
display: none;
}
pre#log {
/* Make it fill at least the space given to it but let it expand beyond
(scrollbars in that tiny area are useless) */
min-height: 100%;
padding: 0.5rem 1rem;
overflow-x: auto;
white-space: pre-wrap; /* same as .m-console-wrap */
word-break: break-all;
margin-top: 0; /* stupid defaults */
color: #e6e6e6; /*var(--code-color)*/
background-color: #282e36; /*var(--code-background-color)*/

Loading…
Cancel
Save