/* * The timeline (administrative/assignment/timeline.html.twig): one grid per house with a fixed * house column and one column per day. The header, the background and every house share the * column template, so their columns line up; --timeline-days is set on .timeline. */ .timeline { --timeline-label: 11rem; --timeline-day: 1.75rem; @apply overflow-auto; max-height: calc(100vh - 260px); } .timeline-grid { display: grid; grid-template-columns: var(--timeline-label) repeat(var(--timeline-days), var(--timeline-day)); } .timeline-background { @apply pointer-events-none absolute inset-0; grid-template-rows: 100%; } .timeline-header { @apply sticky top-0 z-20 border-b-2 border-brand bg-white; } .timeline-corner { @apply sticky left-0 z-10 border-r border-line bg-white; } .timeline-house { @apply relative border-b border-line py-1; grid-auto-rows: 1.75rem; } .timeline-house-label { @apply sticky left-0 z-10 -my-1 border-r border-line bg-white px-3 py-2; } .timeline-bar { @apply relative z-[1] mx-px my-0.5 flex min-w-0 items-center gap-x-1 overflow-hidden whitespace-nowrap px-1.5 text-xs leading-none; } /* the states differ in shape too, not only in colour: dashed, outlined, filled */ .timeline-bar--open { @apply border border-dashed border-muted bg-white text-muted; } .timeline-bar--pending { @apply border border-brand bg-brand-light text-brand-dark; } .timeline-bar--staffed { @apply border border-emerald-800 bg-emerald-700 text-white; } /* timeline_scroll_controller.js: an open hand over the timeline, a closed one while dragging */ .timeline { @apply cursor-grab; } .timeline--dragging, .timeline--dragging * { @apply cursor-grabbing select-none; }