fix: nested split pane flex squeezing and add divider drag resize

This commit is contained in:
2026-09-23 00:23:59 +08:00
parent 6d315447a1
commit 91c0c8f641
2 changed files with 88 additions and 11 deletions
+16 -7
View File
@@ -14,8 +14,11 @@
.split-container {
display: flex;
flex: 1 1 0%;
width: 100%;
height: 100%;
min-width: 0;
min-height: 0;
overflow: hidden;
position: relative;
}
@@ -29,14 +32,14 @@
}
.split-pane {
flex: 1;
flex: 1 1 0%;
display: flex;
position: relative;
overflow: hidden;
border: 1px solid transparent;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
min-width: 120px;
min-height: 80px;
min-width: 0;
min-height: 0;
}
.split-pane.focused {
@@ -49,6 +52,7 @@
height: 100%;
padding: 6px 10px;
overflow: hidden;
box-sizing: border-box;
}
.xterm {
@@ -65,19 +69,24 @@
.split-divider {
background: var(--border-color);
z-index: 10;
transition: background 0.2s ease;
flex-shrink: 0;
flex-grow: 0;
transition: background 0.15s ease, box-shadow 0.15s ease;
position: relative;
}
.split-container.horizontal > .split-divider {
width: 2px;
width: 4px;
cursor: col-resize;
}
.split-container.vertical > .split-divider {
height: 2px;
height: 4px;
cursor: row-resize;
}
.split-divider:hover {
.split-divider:hover,
.split-divider.dragging {
background: var(--accent-color);
box-shadow: 0 0 10px var(--accent-glow);
}