The container with the grid has this css:
.container {
grid-row: 2;
grid-column: 1;
display: grid;
grid-auto-rows: minmax(0, 1fr);
grid-auto-flow: row;
grid-template-columns: 1fr 1fr;
}
Then each "cell" in the grid has this:
.item {
user-select: none;
display: flex;
flex-grow: 1;
overflow-x: visible;
overflow-y: hidden;
width: 100%;
height: 100%;
}
… inside each item is another grid with 3 rows:
.item-content {
display: grid;
grid-template-rows: 20px 20px 1fr;
overflow-y: hidden;
}
then inside those rows, it’s just text.
The problem is when the text on the 3rd row is very long (1fr
– dynamic height) … the item grows, the overall container grows and nothing seems to be able to stop it.
2
Answers
This was fixed in the end by simply adding this to the parent div of the container (of the parent shown in the question):
If you don’t want the inner rows to wrap, you may want the
overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
combo on each of them.