70 lines
1.5 KiB
CSS
70 lines
1.5 KiB
CSS
.event-span {
|
|
font-size: clamp(.45em, 1.8vh, .75em);
|
|
padding: 0 .5em;
|
|
border-radius: .4em;
|
|
color: var(--strong);
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
line-height: 1; /* let the track height define the visual height */
|
|
height: 100%; /* fill the grid row height */
|
|
align-self: stretch; /* fill row vertically */
|
|
justify-self: stretch; /* stretch across chosen grid columns */
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
pointer-events: auto; /* clickable despite overlay having none */
|
|
z-index: 1;
|
|
position: relative;
|
|
cursor: grab;
|
|
}
|
|
|
|
/* Selection styles */
|
|
.cell.selected {
|
|
background: var(--select);
|
|
box-shadow: 0 0 .1em var(--muted) inset;
|
|
}
|
|
.cell.selected .event { opacity: .7 }
|
|
|
|
/* Dragging state */
|
|
.event-span.dragging {
|
|
opacity: .9;
|
|
cursor: grabbing;
|
|
z-index: 4;
|
|
}
|
|
|
|
/* Resize handles */
|
|
.event-span .resize-handle {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 6px;
|
|
background: transparent;
|
|
z-index: 2;
|
|
}
|
|
.event-span .resize-handle.left {
|
|
left: 0;
|
|
cursor: ew-resize;
|
|
}
|
|
.event-span .resize-handle.right {
|
|
right: 0;
|
|
cursor: ew-resize;
|
|
}
|
|
|
|
/* Live preview ghost while dragging */
|
|
.event-preview {
|
|
pointer-events: none;
|
|
opacity: .6;
|
|
outline: 2px dashed currentColor;
|
|
outline-offset: -2px;
|
|
border-radius: .4em;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: clamp(.45em, 1.8vh, .75em);
|
|
line-height: 1;
|
|
height: 100%;
|
|
z-index: 3;
|
|
}
|