Updates all-day event grid row layout

Ensures the all-day event container's grid layout is correctly updated to reflect the number of rows needed, even when the overall height doesn't change.
This prevents layout issues when events are rearranged without triggering a height recalculation.
Also updates the grid template when the height is updated in the BaseEventRenderer.
This commit is contained in:
Janus Knudsen 2025-08-27 20:54:06 +02:00
parent f9b7686b22
commit be4a8af7c4
3 changed files with 27 additions and 4 deletions

View file

@ -267,13 +267,13 @@ swp-day-header[data-today="true"] swp-day-date {
}
/* All-day container - simple container that expands with auto-rows */
/* All-day container - simple container with dynamic grid-template-rows */
swp-allday-container {
grid-column: 1 / -1; /* Span all columns */
grid-row: 2; /* Second row of calendar header */
display: grid;
grid-template-columns: repeat(var(--grid-columns, 7), minmax(var(--day-column-min-width), 1fr));
grid-auto-rows: var(--allday-event-height, 26px); /* Auto-expand rows as needed */
grid-template-rows: repeat(1, var(--allday-event-height, 26px)); /* Default to 1 row, dynamically updated by JS */
gap: 2px;
padding: 2px;
align-items: center;