2026-06-28 16:37:36 -03:00
|
|
|
/*
|
|
|
|
|
* ShrinkVertically -- keep the board's horizontal scrollbar visible when columns
|
|
|
|
|
* are vertically collapsed (gear menu "collapse vertically" / shortcut, which sets
|
|
|
|
|
* localStorage vertical_scroll=0 and adds the class .board-task-list-compact).
|
|
|
|
|
*
|
|
|
|
|
* Kanboard core sets: .board-task-list-compact { max-height: 90vh; }
|
|
|
|
|
* That 90vh is measured from the top of the viewport and ignores the page header
|
|
|
|
|
* above the board, so column + header together exceed the viewport and push the
|
|
|
|
|
* horizontal scrollbar below the fold.
|
|
|
|
|
*
|
|
|
|
|
* We instead reserve a fixed pixel budget for the chrome above and below the task
|
|
|
|
|
* list (page header + board column header + the horizontal scrollbar + a little
|
|
|
|
|
* breathing room). A fixed-px budget is more reliable than a proportional vh value
|
|
|
|
|
* because that chrome is a fixed height regardless of screen size.
|
|
|
|
|
*
|
2026-06-28 17:03:17 -03:00
|
|
|
* The pixel budget is the --sv-shrink-offset CSS variable. It is injected in the
|
|
|
|
|
* page head from the plugin setting (Settings -> Shrink Vertically); when unset it
|
|
|
|
|
* falls back to 240px below. Increase it if the scrollbar is still clipped, or
|
|
|
|
|
* decrease it to make the columns taller.
|
2026-06-28 16:37:36 -03:00
|
|
|
*
|
|
|
|
|
* The selector is intentionally more specific than core's single-class rule, and
|
|
|
|
|
* uses !important, so this override wins even alongside a theme (e.g. Essential).
|
2026-06-28 16:49:42 -03:00
|
|
|
*
|
|
|
|
|
* The min-height override is essential: Kanboard's drag-and-drop sets an INLINE
|
|
|
|
|
* min-height on each column equal to its full content height
|
|
|
|
|
* (BoardDragAndDrop.js: css("min-height", parent().height())). In CSS, min-height
|
|
|
|
|
* beats max-height, so that inline value keeps tall columns from shrinking and our
|
|
|
|
|
* max-height alone does nothing. A stylesheet !important overrides the inline
|
2026-07-04 09:50:45 -03:00
|
|
|
* (non-important) min-height so max-height can win.
|
|
|
|
|
*
|
2026-07-06 21:11:39 -03:00
|
|
|
* We override it to a NON-ZERO value, not 0: Kanboard relies on that same inline
|
2026-07-04 09:50:45 -03:00
|
|
|
* min-height to keep EMPTY columns tall enough to be a drop target, so zeroing it makes
|
2026-07-06 21:11:39 -03:00
|
|
|
* you unable to drop a card into an empty collapsed column. 250px gives a comfortable drop
|
|
|
|
|
* target (well above Kanboard's 70px .draggable-placeholder) while staying below the
|
|
|
|
|
* collapsed max-height, so the board never overflows the viewport (which would re-hide the
|
|
|
|
|
* horizontal scrollbar). Non-empty columns are unaffected -- their content is taller -- and
|
|
|
|
|
* short columns simply get this min-height, which is only cosmetic (no scrollbar).
|
2026-06-28 16:37:36 -03:00
|
|
|
*/
|
|
|
|
|
#board td .board-task-list.board-task-list-compact {
|
2026-06-28 17:03:17 -03:00
|
|
|
max-height: calc(100vh - var(--sv-shrink-offset, 240px)) !important;
|
2026-07-06 21:11:39 -03:00
|
|
|
min-height: 250px !important;
|
2026-06-28 16:37:36 -03:00
|
|
|
}
|
2026-06-28 17:12:25 -03:00
|
|
|
|
|
|
|
|
/*
|
2026-07-01 10:05:52 -03:00
|
|
|
* Optional custom top horizontal scrollbar (built by Asset/js/top-scrollbar.js when the
|
|
|
|
|
* "Add a top horizontal scrollbar" setting is enabled). It is a track + draggable thumb,
|
|
|
|
|
* not a native scrollbar, so it renders and can be sized identically in every browser
|
|
|
|
|
* (Chrome, Firefox, Safari) and on touch. Thickness follows the --sv-bar-size variable
|
|
|
|
|
* (Settings -> Shrink Vertically), injected in the page head; falls back to 25px.
|
|
|
|
|
* touch-action: none lets a finger drag the thumb without scrolling the page.
|
2026-06-28 17:12:25 -03:00
|
|
|
*/
|
|
|
|
|
.sv-top-scroll {
|
2026-07-01 10:05:52 -03:00
|
|
|
position: relative;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: var(--sv-bar-size, 25px);
|
|
|
|
|
background: rgba(0, 0, 0, 0.06);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
touch-action: none;
|
2026-06-28 17:12:25 -03:00
|
|
|
}
|
2026-06-28 17:19:04 -03:00
|
|
|
|
2026-07-01 10:05:52 -03:00
|
|
|
.sv-top-scroll-thumb {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
width: 0;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: rgba(0, 0, 0, 0.35);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
cursor: grab;
|
|
|
|
|
touch-action: none;
|
2026-07-01 09:42:51 -03:00
|
|
|
}
|
|
|
|
|
|
2026-07-01 10:05:52 -03:00
|
|
|
.sv-top-scroll.sv-dragging .sv-top-scroll-thumb {
|
|
|
|
|
cursor: grabbing;
|
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
2026-07-01 09:42:51 -03:00
|
|
|
}
|
|
|
|
|
|
2026-07-01 10:05:52 -03:00
|
|
|
.sv-dragging {
|
|
|
|
|
user-select: none;
|
2026-07-01 09:42:51 -03:00
|
|
|
}
|