Merge pull request #2404 from nqst/dialog-viewport-spacing

Prevent modal dialogs from touching viewport edges
This commit is contained in:
Andy Smith
2026-01-21 11:23:01 -06:00
committed by GitHub
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -35,4 +35,9 @@
}
}
}
/* Ensure padding from viewport edges */
.dialog.panel {
max-inline-size: calc(100vw - var(--inline-space-double) * 2);
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
<%= icon_tag "trash" %>
<span>Delete this board</span>
</button>
<dialog class="dialog panel fill-white shadow gap flex-column" style="max-width: 40ch" data-dialog-target="dialog">
<dialog class="dialog panel fill-white shadow gap flex-column" style="--panel-size: 40ch" data-dialog-target="dialog">
<h3 class="txt-large txt-bold">Delete this board?</h3>
<p class="txt-medium margin-block-half">Are you sure you want to permanently delete this board and all the cards on it? This can't be undone.</p>
<div class="flex gap-half justify-center margin-block-start">
+1 -1
View File
@@ -3,7 +3,7 @@
<%= icon_tag "trash" %>
<span>Delete this card</span>
</button>
<dialog class="dialog panel fill-white shadow gap flex-column" style="max-width: 40ch" data-dialog-target="dialog">
<dialog class="dialog panel fill-white shadow gap flex-column" style="--panel-size: 40ch" data-dialog-target="dialog">
<h3 class="txt-large txt-bold">Delete this card?</h3>
<p class="txt-medium margin-block-half">Are you sure you want to permanently delete this card?</p>
<div class="flex gap-half justify-center margin-block-start">