fix: grid items position:relative to restore multi-cell spans
This commit is contained in:
+7
-19
@@ -356,17 +356,6 @@
|
|||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
}
|
}
|
||||||
/* ---- Grid Container ---- */
|
|
||||||
.grid-preview {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat({{ grid.cols }}, 1fr);
|
|
||||||
grid-template-rows: repeat({{ grid.rows }}, 120px);
|
|
||||||
gap: 6px;
|
|
||||||
background: var(--border);
|
|
||||||
padding: 6px;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---- Empty Cell (drop target) ---- */
|
/* ---- Empty Cell (drop target) ---- */
|
||||||
.grid-cell {
|
.grid-cell {
|
||||||
@@ -387,12 +376,7 @@
|
|||||||
outline-offset: -2px;
|
outline-offset: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---- Occupied Cell: occupied items sit inside their origin cell ---- */
|
/* ---- Grid Item: positioned by CSS Grid (grid-column/grid-row spans) ---- */
|
||||||
.grid-cell.occupied {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---- Grid Item: sits INSIDE its origin grid-cell ---- */
|
|
||||||
.grid-item {
|
.grid-item {
|
||||||
background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
|
background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
|
||||||
border: 1px solid var(--border-light);
|
border: 1px solid var(--border-light);
|
||||||
@@ -402,13 +386,17 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
position: absolute;
|
position: relative;
|
||||||
inset: 0;
|
|
||||||
cursor: grab;
|
cursor: grab;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
transition: box-shadow 0.15s ease, border-color 0.15s ease;
|
transition: box-shadow 0.15s ease, border-color 0.15s ease;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Occupied cells: item sits inside, cell background fades */
|
||||||
|
.grid-cell.occupied {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
.grid-item:hover { border-color: var(--accent-bright); background: var(--surface-2); }
|
.grid-item:hover { border-color: var(--accent-bright); background: var(--surface-2); }
|
||||||
.grid-item:active { cursor: grabbing; }
|
.grid-item:active { cursor: grabbing; }
|
||||||
.grid-item.dragging {
|
.grid-item.dragging {
|
||||||
|
|||||||
Reference in New Issue
Block a user