fix: center card on landscape mobile

This commit is contained in:
2026-10-26 22:15:10 +01:00
parent dac9557749
commit 96d48d9c19
2 changed files with 96 additions and 16 deletions
+38 -7
View File
@@ -123,19 +123,26 @@ button,
}
}
/* Phone layout */
/* ---------- Phone layout ---------- */
@media (max-width: 768px) {
.stage {
align-items: center; /* tall content starts at top instead of being clipped */
align-items: flex-start;
justify-content: center;
padding: 8px;
padding: 12px 8px;
overflow-y: auto;
overflow-x: hidden;
min-height: 0;
-webkit-overflow-scrolling: touch;
}
.stage > * {
margin: auto;
margin: 0 auto;
flex-shrink: 0;
}
/* iOS zooms the page if an input's font is under 16px */
/* Prevent inputs from triggering iOS focus zoom */
input,
select,
textarea {
@@ -143,9 +150,33 @@ button,
}
}
/* Landscape phone: reclaim vertical space */
/* ---------- Landscape phone ---------- */
@media (max-height: 500px) and (orientation: landscape) {
.app {
height: 100vh;
height: 100dvh;
min-height: 0;
}
.stage {
padding: 4px;
align-items: flex-start;
justify-content: center;
padding: 8px;
overflow-y: auto;
overflow-x: hidden;
min-height: 0;
}
.stage > * {
margin: 0 auto;
flex-shrink: 0;
}
.add-dsp-form {
width: 100%;
max-width: 520px;
margin-top: 0;
margin-bottom: 8px;
}
}
+58 -9
View File
@@ -1,19 +1,26 @@
.credits-page {
width: 100%;
max-width: 520px;
margin: auto;
user-select: none;
-webkit-user-select: none;
}
.credits-page__header {
margin-bottom: var(--space-5);
}
.credits-page__title {
margin: 0;
font-size: var(--font-2xl);
font-weight: var(--font-weight-semibold);
color: var(--text-primary);
}
.credits-page__subtitle {
margin: var(--space-2) 0 0;
font-size: var(--font-sm);
color: var(--text-muted);
}
@@ -21,18 +28,60 @@
.credits-page__actions {
display: flex;
justify-content: flex-end;
margin-top: var(--space-2);
}
.credits-page {
user-select: none;
-webkit-user-select: none;
}
.credits-page input,
.credits-page select,
.credits-page textarea {
user-select: text;
-webkit-user-select: text;
}
/* ---------- Phone ---------- */
@media (max-width: 768px) {
.credits-page {
max-width: 480px;
}
}
/* ---------- Landscape phone: compact card ---------- */
@media (max-height: 500px) and (orientation: landscape) {
.credits-page {
max-width: 440px;
}
.credits-page__header {
margin-bottom: 8px;
}
.credits-page__title {
font-size: var(--font-lg);
}
.credits-page__subtitle {
margin-top: 4px;
font-size: 12px;
}
.credits-page .specs {
gap: 6px;
margin-bottom: 8px;
padding: 8px 12px;
}
.credits-page .spec {
gap: 12px;
}
.credits-page .spec dt,
.credits-page .spec dd {
font-size: 12px;
}
.credits-page__actions {
margin-top: 4px;
}
}