mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
A resize drag set document.body.style.cursor, so as soon as the pointer left the 1px handle the element under it (tree, editor, button) showed its own cursor mid-drag. The drag now holds the cursor on <html> with a data-drag-cursor rule that overrides descendant cursors, released on pointerup/pointercancel/window blur, with nested locks restoring the outer cursor. Tool-window gaps, split and stripe handles, the dialog resize grip and database / Git Log column resizing share it, and the handles use ew-resize / ns-resize throughout. Co-authored-by: makise2060 <263516586+makise2060@users.noreply.github.com>
72 lines
1.4 KiB
CSS
72 lines
1.4 KiB
CSS
.group {
|
|
min-width: 0;
|
|
min-height: 0;
|
|
}
|
|
.panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
min-height: 0;
|
|
height: 100%;
|
|
}
|
|
.handle {
|
|
position: relative;
|
|
flex: none;
|
|
background: var(--border);
|
|
outline: none;
|
|
transition: background var(--dur) var(--ease);
|
|
}
|
|
.handle[aria-orientation="vertical"] {
|
|
width: 1px;
|
|
cursor: ew-resize;
|
|
}
|
|
.handle[aria-orientation="horizontal"] {
|
|
height: 1px;
|
|
cursor: ns-resize;
|
|
}
|
|
.handle::after {
|
|
content: "";
|
|
position: absolute;
|
|
z-index: var(--z-panel);
|
|
}
|
|
.handle[aria-orientation="vertical"]::after {
|
|
inset: 0 -3px;
|
|
}
|
|
.handle[aria-orientation="horizontal"]::after {
|
|
inset: -3px 0;
|
|
}
|
|
.handle[data-separator="hover"],
|
|
.handle:focus-visible {
|
|
background: var(--border-strong);
|
|
}
|
|
.handle[data-separator="active"] {
|
|
background: var(--border-strong);
|
|
}
|
|
.handle[data-separator="disabled"] {
|
|
cursor: default;
|
|
}
|
|
|
|
.invisible,
|
|
.invisible[data-separator] {
|
|
background: none;
|
|
}
|
|
.invisible[aria-orientation="vertical"] {
|
|
width: 0;
|
|
}
|
|
.invisible[aria-orientation="horizontal"] {
|
|
height: 0;
|
|
}
|
|
/* Islands gaps: nothing is drawn while dragging; keyboard focus still shows. */
|
|
.invisible:focus-visible::after {
|
|
background: color-mix(in srgb, var(--focus-ring) 55%, transparent);
|
|
}
|
|
.handle[data-separator="disabled"]::after {
|
|
display: none;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.handle {
|
|
transition: none;
|
|
}
|
|
}
|