Skip to content

Commit

Permalink
Disallow widgets to resize based on their content (#412)
Browse files Browse the repository at this point in the history
Previously, widget sizes would vary baased on the content.

Cf. https://www.w3.org/TR/css3-grid-layout/#min-size-auto – by adding `overflow: auto` to the widget containers, they become scroll containers (the grid items) and their _"automatic minimum size is zero, as usual"_.

Thanks to https://stackoverflow.com/a/43312314/9276604 for the hint!
  • Loading branch information
pklaschka authored Jan 17, 2024
2 parents 9808011 + 3ec4e61 commit 26a60de
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.widgetRenderer {
/* Initial state, gets overwritten through inline styles */
--id: loading;

/* Place the widget in the correct grid area */
grid-area: var(--id);

/* Disallow grid areas to resize based on content */
overflow: auto;
}

0 comments on commit 26a60de

Please sign in to comment.