fix: use grid instead of flex m-auto for BaseViewTemplate centering

Flexbox has a known gotcha where auto margins go negative when content
exceeds the container, pushing content off the top. CSS grid's
place-items-center handles overflow correctly — content centers when it
fits, aligns to top when it doesn't, and scrolls properly. Fixes /connect
still being unscrollable from the previous m-auto attempt.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
snomiao
2026-04-12 03:10:16 +09:00
parent e2156dbe2a
commit 6c371bedfa

View File

@@ -13,8 +13,8 @@
ref="topMenuRef"
class="app-drag h-(--comfy-topbar-height) w-full"
/>
<div class="flex w-full grow justify-center overflow-auto">
<div class="m-auto py-8">
<div class="grid w-full grow place-items-center overflow-auto">
<div class="py-8">
<slot />
</div>
</div>