瀏覽代碼

Svelte: Favor traditional absolute positioning for xterm and surrouding top-level components

xterm resizing interacts very poorly with flex
Alessandro Pignotti 9 月之前
父節點
當前提交
854b93ec07
共有 3 個文件被更改,包括 5 次插入4 次删除
  1. 1 1
      src/lib/SideBar.svelte
  2. 1 0
      src/lib/global.css
  3. 3 3
      src/routes/+page.svelte

+ 1 - 1
src/lib/SideBar.svelte

@@ -26,7 +26,7 @@
 	}
 </script>
 
-<div class="flex flex-row w-14 bg-neutral-700" on:mouseleave={hideInfo}>
+<div class="flex flex-row w-14 h-full bg-neutral-700" on:mouseleave={hideInfo}>
 	<div class="flex flex-col shrink-0 w-14 text-gray-300">
 		{#each icons as i}
 			{#if i}

+ 1 - 0
src/lib/global.css

@@ -8,6 +8,7 @@ body
 	font-family: Archivo, sans-serif;
 	margin: 0;
 	height: 100%;
+	overflow: hidden;
 	background: black;
 }
 

+ 3 - 3
src/routes/+page.svelte

@@ -159,11 +159,11 @@
 	}
 </script>
 
-<main class="flex flex-col w-full h-full">
+<main class="relative w-full h-full">
 	<Nav />
-	<div class="flex flex-row flex-grow">
+	<div class="absolute top-10 bottom-0 left-0 right-0">
 		<SideBar on:connect={handleConnect}/>
-		<div class="grow h-full p-1 scrollbar" id="console">
+		<div class="absolute top-0 bottom-0 left-14 right-0 p-1 scrollbar" id="console">
 		</div>
 	</div>
 </main>