Fix GModal content truncation when dialog has no fixed height

Without an explicit height on the dialog, `section { height: 100% }` resolved
to auto and `.g-modal-content`'s `overflow: auto` never activated, so the
dialog clipped instead of scrolling. Cap the dialog at `max-height: calc(100vh
- 4rem)` and move `section { height: 100% }` to only apply inside
`.g-fixed-height` and `.g-fullscreen`, where the dialog has an explicit pixel
height that makes the percentage meaningful.
This commit is contained in:
mvdbeek
2026-06-17 12:57:29 +02:00
parent 42f1ef7bc7
commit 13acce10ba
@@ -239,8 +239,9 @@ defineExpose({ showModal, hideModal });
padding: var(--spacing-3);
max-height: calc(100vh - 4rem);
section {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
@@ -253,12 +254,17 @@ defineExpose({ showModal, hideModal });
padding: var(--spacing-2);
margin: calc(var(--spacing-2) * -1);
max-height: 100%;
display: flex;
flex-direction: column;
}
}
&.g-fixed-height {
section {
height: 100%;
}
}
&.g-overflow-visible {
overflow: visible;
@@ -306,6 +312,10 @@ defineExpose({ showModal, hideModal });
height: calc(100vh - 6rem);
max-width: calc(100vw - 6rem);
max-height: calc(100vh - 6rem);
section {
height: 100%;
}
}
header {