fix(ui): center dialogs again after the global margin reset #6
No files matched your search
+2
-2
@@ -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; }
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user