mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
In an opened card's Dependencies section each row is an icon, the linked card's title and its controls, and the title was `white-space: nowrap` with an ellipsis. The card details pane is narrow and a card title is a sentence, so most of a real title - everything right of the coloured icon - could not be read at all. It wraps now. Two properties, and the second is the one that is easy to miss: `white-space: normal` alone would have changed nothing, because a flex item's default `min-width: auto` refuses to shrink below its content, so the text overflowed the row rather than wrapping inside it. `min-width: 0` is what lets it wrap, and there is a negative test saying so, because removing it would look harmless. A title that is one long token - a URL, an id - breaks inside itself with `overflow-wrap: anywhere` rather than pushing the type, colour and remove controls off the row. The row aligns to flex-start now, so the icon and the controls sit beside the FIRST line instead of floating halfway down a three-line block. Thanks to xet7 !
141 lines
3.4 KiB
CSS
141 lines
3.4 KiB
CSS
.dependency-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
inset-inline-start: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
z-index: 100;
|
|
overflow: visible;
|
|
}
|
|
|
|
/* #3392: the overlay SVG stays click-through, but each line is clickable (to
|
|
open the edit/delete popup) even though its container is pointer-events:none. */
|
|
.dependency-line {
|
|
pointer-events: stroke;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.dependency-temp-line {
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* #3392: drag-to-connect handle on the minicard (no mode — cards stay
|
|
clickable). Shown on hover; drag it onto another card to create a link. */
|
|
.minicard .dependency-connect-handle {
|
|
position: absolute;
|
|
top: 50%;
|
|
inset-inline-end: -7px;
|
|
transform: translateY(-50%);
|
|
width: 18px;
|
|
height: 18px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #eb144c;
|
|
background: #fff;
|
|
border-radius: 50%;
|
|
box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
|
|
cursor: crosshair;
|
|
opacity: 0;
|
|
z-index: 101;
|
|
}
|
|
|
|
.minicard:hover .dependency-connect-handle {
|
|
opacity: 1;
|
|
}
|
|
|
|
.dependency-line-popup .dependency-field {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.dependency-line-popup .card-dependency-icons li a.is-selected {
|
|
border-color: #eb144c;
|
|
border-width: 2px;
|
|
}
|
|
|
|
.dependency-line-delete {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
color: #eb144c;
|
|
}
|
|
|
|
/* #3392: card detail "Dependencies" rows */
|
|
.card-details-dependencies-list .card-dependency {
|
|
display: flex;
|
|
/* The title WRAPS now, so the row can be two or three lines tall. Centring
|
|
the icon and the controls against that block would float them halfway down
|
|
it; they belong beside the first line. */
|
|
align-items: flex-start;
|
|
gap: 6px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.card-details-dependencies-list .card-dependency-link {
|
|
flex: 1 1 auto;
|
|
/* A card's title is a sentence, and the card details pane is narrow. It used
|
|
to be one line with an ellipsis, so everything past the width of the pane -
|
|
which is most of a real title, sitting right of the coloured icon - could
|
|
not be read at all. There is no reason to hide it: the row can be tall.
|
|
`min-width: 0` is what makes that work. A flex item's default is
|
|
`min-width: auto`, which refuses to shrink below its content, so the text
|
|
overflowed the row instead of wrapping inside it - and no amount of
|
|
`white-space: normal` alone would have fixed that. */
|
|
min-width: 0;
|
|
white-space: normal;
|
|
/* A title can be a URL or an id with no spaces in it; break inside the word
|
|
rather than let one long token push the controls off the row. */
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.card-details-dependencies-list .js-dependency-type {
|
|
flex: 0 0 auto;
|
|
max-width: 130px;
|
|
}
|
|
|
|
.card-details-dependencies-list .js-dependency-color {
|
|
flex: 0 0 auto;
|
|
width: 28px;
|
|
height: 24px;
|
|
padding: 0;
|
|
border: none;
|
|
background: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.card-dependencies-popup .dependency-field {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.card-dependency-icons {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 4px;
|
|
}
|
|
|
|
.card-dependency-icons li a {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 32px;
|
|
height: 32px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.minicard .badge.minicard-dependencies .badge-icon {
|
|
font-weight: bold;
|
|
}
|