diff --git a/static/style.css b/static/style.css index be3489f..d799ce8 100644 --- a/static/style.css +++ b/static/style.css @@ -104,8 +104,8 @@ td select { max-width: 340px; } .score-none { color: var(--muted); } .volume { width: 90px; } -/* dialogs */ -dialog { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem; min-width: 340px; max-width: min(640px, 92vw); } +/* dialogs; margin: auto undoes the * reset, which pins them to the top left */ +dialog { margin: auto; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem; min-width: 340px; max-width: min(640px, 92vw); } dialog::backdrop { background: rgba(0,0,0,0.6); } dialog label { display: flex; flex-direction: column; gap: 0.2rem; margin: 0.5rem 0; font-size: 0.9rem; color: var(--muted); flex: 1; } .detail-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 0.5rem; } diff --git a/tests/test_ui_dialogs.py b/tests/test_ui_dialogs.py index 92b2fd8..027775d 100644 --- a/tests/test_ui_dialogs.py +++ b/tests/test_ui_dialogs.py @@ -97,6 +97,8 @@ def test_import_dialog_opens_and_closes(page): page.click("[data-quick='0']") page.wait_for_selector("#quick-dialog[open]") assert page.locator("#quick-dialog").is_visible() + box = page.locator("#quick-dialog").bounding_box() + assert abs(box["x"] + box["width"] / 2 - 600) < 10 # centered in the viewport # everything reachable, nothing cut off at the bottom for sel in ("#quick-m-submit", "#quick-close"): box = page.locator(sel).bounding_box()