Tighten mobile layout: fix hero height and tap targets
- Fix .mu-select-field flex-basis bug: flex:1 1 250px became a 250px HEIGHT basis when the selector stacks to a column on phone, bloating the home/check heroes to ~700-760px. Reset to flex:0 0 auto (content height) -> heroes now ~350-420px - Enlarge tap targets on phone: language buttons 21px -> 40px, footer links and contact link -> 44px min-height Verified with headless Chrome: 0 horizontal overflow at 320-1600px, hero heights sane on phone.
This commit is contained in:
1 parent
0a464b6b18
commit
0ac33f0735
1 file changed
+5
-2
+5
-2
@@ -45,7 +45,7 @@ main.mu-container { padding-top: 24px; padding-bottom: 24px; }
|
||||
.mu-nav { gap: 8px; margin-left: auto; flex-shrink: 0; }
|
||||
.mu-nav a { font-size: .76rem; padding: 10px 2px; white-space: nowrap; } /* tap target ≥44px */
|
||||
.mu-lang-switch { margin-left: 2px; padding: 2px; }
|
||||
.mu-lang-btn { font-size: .68rem; padding: 5px 8px; }
|
||||
.mu-lang-btn { font-size: .68rem; padding: 8px 12px; min-height: 40px; min-width: 40px; } /* tap target */
|
||||
.mu-action-btn { display: none; } /* กันล้นบนจอเล็ก — โผล่กลับ ≥640px */
|
||||
|
||||
/* --- hero (หน้าแรก) — ลดช่องว่างแนวตั้ง --- */
|
||||
@@ -59,8 +59,9 @@ main.mu-container { padding-top: 24px; padding-bottom: 24px; }
|
||||
/* --- ตัวเลือกจังหวัด/สถานี (หน้าแรก) --- */
|
||||
#view .mu-route-selector { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 12px; }
|
||||
#view .mu-route-selector select,
|
||||
#view .mu-route-selector .mu-select-field,
|
||||
#view .mu-route-selector .mu-select-arrow { width: 100%; }
|
||||
/* flex-basis 250px (จาก index.html) กลายเป็นความสูงตอน column — reset เป็น content height */
|
||||
#view .mu-route-selector .mu-select-field { width: 100%; flex: 0 0 auto; }
|
||||
#view .mu-select-arrow { transform: rotate(90deg); justify-content: center; }
|
||||
|
||||
/* --- marquee (สปอนเซอร์) — การ์ดเล็กลงบนมือถือ --- */
|
||||
@@ -122,6 +123,8 @@ main.mu-container { padding-top: 14px; padding-bottom: 14px; }
|
||||
.mu-site-footer { margin-top: 24px; padding: 28px 0 0; }
|
||||
.mu-site-footer .mu-container { padding: 0 16px; }
|
||||
.mu-footer-grid { grid-template-columns: 1fr; gap: 20px; }
|
||||
.mu-footer-col ul a { padding: 10px 0; min-height: 44px; } /* tap target */
|
||||
.mu-footer-contact a { min-height: 44px; } /* tap target */
|
||||
.mu-sponsor-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
|
||||
|
||||
/* --- จอแคบมาก (≤360px): topbar ห่อแถว ไม่ให้ nav ถูกตัด --- */
|
||||
|
||||
Reference in new issue
Block a user