Skip to content

fix(web-ui): make miniapp cards fill grid tracks - #1912

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/miniapp-card-fluid-width
Jul 31, 2026
Merged

fix(web-ui): make miniapp cards fill grid tracks#1912
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/miniapp-card-fluid-width

Conversation

@bobleer

@bobleer bobleer commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

问题

小应用页的应用卡片写死了 width: 360px,而 GalleryGrid 的列轨道使用 repeat(auto-fill, minmax(360px, 1fr)) 会随窗口拉伸。两者冲突导致窗口尺寸稍有变化时,卡片不跟随轨道变宽,页面出现大片空白;容器窄于 360px 时卡片还会横向溢出。

修复

  • MiniAppCard.scss:卡片改为 width: 100%; min-width: 0,宽度交给网格轨道控制,任意窗口宽度下填满所在列;删除 720px 断点下冗余的宽度覆盖。
  • GalleryLayout.scss:网格列改为 minmax(min(var(--gallery-grid-min), 100%), 1fr),容器窄于最小卡宽时卡片收缩而非溢出,同时惠及所有使用 GalleryGrid 的页面。

网格使用 auto-fill(保留空轨道),因此“已启动”区只有一个应用时卡片仍只占一列宽,不会被拉成全宽。

两个 SCSS 文件已通过 sass 编译验证。

MiniAppCard had a fixed 360px width while GalleryGrid tracks stretch
with minmax(360px, 1fr), so any slight window resize left large blank
areas beside each card, and containers narrower than 360px overflowed.

- MiniAppCard: width 100% so the grid track controls sizing
- GalleryGrid: minmax(min(var(--gallery-grid-min), 100%), 1fr) so cards
  shrink instead of overflowing below the minimum card width
@bobleer
bobleer merged commit 0b5e6ec into GCWing:main Jul 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant