Fix narrow PWA layout on tablet with standalone width rules.

Allow any orientation in manifest, widen content and enable dual-column mode in installed apps on tablet viewports, with iOS display-mode fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-11 09:07:48 +08:00
parent 234ce18756
commit 98b83a5f75
8 changed files with 61 additions and 5 deletions
+30
View File
@@ -126,4 +126,34 @@
.zen-card {
@apply bg-card/85 backdrop-blur-sm;
}
/* PWA 安装后:iPad 等平板视口常 <1024px,单独放宽宽度与双栏 */
@media (display-mode: standalone) and (min-width: 768px) and (max-width: 1919px) {
.site-content-shell {
max-width: 72rem;
}
.site-content-shell-narrow {
max-width: 64rem;
}
.mode-workspace-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
}
/* iOS PWA 兜底:部分系统不识别 display-mode 媒体查询 */
@media (min-width: 768px) and (max-width: 1919px) {
html[data-display-mode="standalone"] .site-content-shell {
max-width: 72rem;
}
html[data-display-mode="standalone"] .site-content-shell-narrow {
max-width: 64rem;
}
html[data-display-mode="standalone"] .mode-workspace-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}