From 1d8d274fdd70ef490333e695fd6568032e1f089d Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Wed, 25 Mar 2026 23:51:21 -0400 Subject: [PATCH] feat: comprehensive mobile/responsive audit fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Touch targets: - All .lt-btn-sm, .lt-menu-btn, .lt-page-btn, .lt-dropdown-trigger, .lt-notif-bell-btn now 44px minimum on pointer:coarse devices Font size floors: - Nothing below 0.72rem on XS; nav drawer, cmd palette, stats, timeline, dropdown items, notification timestamps all bumped to readable sizes Notification panel: - width: min(300px,92vw) prevents overflow on 320px screens - max-height: min(280px,calc(80vh-110px)) for landscape safety - title: 2-line clamp instead of single-line truncate - Header/time font sizes increased to 0.75rem/0.7rem Dropdown panels: - Advanced filter: clamp(200px,60vw,260px) instead of fixed 240px - All dropdowns: max-width:90vw + proper alignment on SM/XS - Dropdown items: 0.78-0.8rem, 36px min-height Toolbar: - toolbar-left/right now flex-wrap on SM+XS; search expands full-width - Result count hidden on XS (.lt-hide-xs) to uncramp narrow toolbars Drawer: - Right drawer goes full-width (100vw) on SM with border-top - Status/Priority 2-col form grid collapses to 1-col (.lt-drawer-form-grid) Table card mode: - Breakpoint corrected from rogue 640px → 767px (system breakpoint) - Row min-height 36px, font bumped to 0.78rem Kanban: - Keeps 2-col at SM and XS (was collapsing to 1-col, confusing semantics) Grids: - Chart demo, sortable demo: auto-fit minmax so they reflow naturally - Countdown stat grid: auto-fit minmax(160px,1fr) instead of fixed 3-col - Grid gap reduced to var(--space-sm) at XS Split pane: - Demo height: clamp(160px,30vh,240px) instead of fixed 200px - Stacks vertically on SM with horizontal divider Modals: - max-width: 640px cap prevents 4K-wide modals; overridden on SM/XS Header: - Brand title truncated at max-width:110px on XS - WS status indicator hidden on XS to free header space - Admin badge hidden on XS - Safe-area insets applied to header-right and toast container Landscape phone: - Modal max-height respects viewport; notif list shrinks Breakpoint consistency: - Removed rogue 640px breakpoint; all queries use 479/767/1023/1279px system Section 78 added with all targeted overrides. Co-Authored-By: Claude Sonnet 4.6 --- base.css | 264 ++++++++++++++++++++++++++++++++++++++++++++++++++---- base.html | 30 +++---- 2 files changed, 264 insertions(+), 30 deletions(-) diff --git a/base.css b/base.css index 2d09fb0..0a26ce1 100644 --- a/base.css +++ b/base.css @@ -1822,12 +1822,15 @@ select option:checked { /* ── Touch / coarse pointer (finger-friendly tap targets) ── */ @media (pointer: coarse) { .lt-btn, .lt-input, .lt-select, .lt-textarea { min-height: 44px; } - .lt-btn-sm { min-height: 36px; } + .lt-btn-sm { min-height: 44px; } /* 44px minimum per WCAG / Apple HIG */ + .lt-menu-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; } .lt-nav-link { padding: 0 var(--space-md); min-height: 44px; display: inline-flex; align-items: center; } .lt-accordion-header { min-height: 48px; } .lt-tab { min-height: 44px; padding: var(--space-sm) var(--space-lg); } .lt-list-item { min-height: 44px; } - .lt-page-btn { min-height: 36px; min-width: 36px; } + .lt-page-btn { min-height: 44px; min-width: 44px; } + .lt-dropdown-trigger { min-height: 44px; } + .lt-notif-bell-btn { min-height: 44px !important; min-width: 44px; } .lt-checkbox, .lt-radio { width: 20px; height: 20px; } input[type="range"].lt-range { height: 8px; } input[type="range"].lt-range::-webkit-slider-thumb { width: 22px; height: 22px; } @@ -1928,9 +1931,18 @@ select option:checked { .lt-stats-grid { grid-template-columns: repeat(2, 1fr); } .lt-toolbar { flex-direction: column; align-items: stretch; gap: var(--space-sm); } + .lt-toolbar-left, .lt-toolbar-right { flex-wrap: wrap; gap: var(--space-xs); } + .lt-search { flex: 1 1 100%; } + .lt-search .lt-search-input { width: 100%; } .lt-page-header { flex-direction: column; align-items: flex-start; gap: var(--space-sm); } .lt-btn-group { flex-wrap: wrap; } + /* Kanban: stay 2-col on SM so columns remain legible */ + #tab-kanban .lt-grid-4 { grid-template-columns: repeat(2, 1fr); } + + /* Drawer form 2-col → 1-col on SM */ + .lt-drawer-form-grid { grid-template-columns: 1fr !important; } + /* Full-width modals on phone */ .lt-modal { width: 96vw; @@ -2053,9 +2065,44 @@ select option:checked { } .lt-data-table th, - .lt-data-table td { padding: 0.35rem 0.5rem; font-size: 0.7rem; } + .lt-data-table td { padding: 0.4rem 0.5rem; font-size: 0.75rem; } - .lt-tab { padding: var(--space-xs) var(--space-sm); font-size: 0.65rem; } + .lt-tab { padding: var(--space-xs) var(--space-sm); font-size: 0.7rem; } + + /* Toolbar stacks fully on XS */ + .lt-toolbar-left, .lt-toolbar-right { + flex-wrap: wrap; + gap: var(--space-xs); + width: 100%; + } + .lt-search { flex: 1 1 100%; } + .lt-search .lt-search-input { width: 100%; } + .lt-dropdown-wrap { flex: 0 0 auto; } + + /* Grid gap tighter on XS */ + .lt-grid-2, .lt-grid-3, .lt-grid-4 { gap: var(--space-sm); } + + /* Stats grid: 2-col but with tighter gap already set above */ + .lt-stats-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xs); } + + /* Kanban: stay 2-col on XS so columns are still readable */ + #tab-kanban .lt-grid-4 { grid-template-columns: repeat(2, 1fr); } + + /* Drawer form 2-col → 1-col on XS */ + .lt-drawer-form-grid { grid-template-columns: 1fr !important; } + + /* Dropdowns: constrain to viewport on XS */ + .lt-dropdown-panel { min-width: unset; max-width: 92vw; left: 0; right: auto; } + .lt-dropdown-panel--right { left: auto; right: 0; } + + /* Notification panel: constrain to viewport */ + .lt-notif-panel { width: min(300px, 92vw); } + + /* Pagination: show prev/next + active only on XS */ + .lt-page-btn:not(.active):not(:first-child):not(:last-child):not([disabled]) { display: none; } + .lt-page-btn.active, + .lt-page-btn:first-child, + .lt-page-btn:last-child { display: inline-flex; } } @@ -3021,7 +3068,7 @@ input[type="range"].lt-range::-moz-range-thumb { /* ---------------------------------------------------------------- 46. RESPONSIVE TABLE → CARD MODE ---------------------------------------------------------------- */ -@media (max-width: 640px) { +@media (max-width: 767px) { .lt-table-responsive thead { display: none; } .lt-table-responsive tbody tr { display: block; @@ -3033,9 +3080,11 @@ input[type="range"].lt-range::-moz-range-thumb { .lt-table-responsive td { display: flex; justify-content: space-between; + align-items: center; padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--border-dim); - font-size: 0.75rem; + font-size: 0.78rem; + min-height: 36px; } .lt-table-responsive td:last-child { border-bottom: none; } .lt-table-responsive td::before { @@ -3044,7 +3093,7 @@ input[type="range"].lt-range::-moz-range-thumb { text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); - font-size: 0.7rem; + font-size: 0.72rem; flex-shrink: 0; margin-right: var(--space-sm); } @@ -4538,7 +4587,7 @@ body.lt-is-offline .lt-main { margin-top: 2rem; transition: margin-top 0.25s eas position: absolute; top: calc(100% + 6px); right: 0; - width: 300px; + width: min(300px, 92vw); background: var(--bg-secondary); border: 1px solid var(--border-color); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); @@ -4549,6 +4598,7 @@ body.lt-is-offline .lt-main { margin-top: 2rem; transition: margin-top 0.25s eas opacity: 0; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; + overflow: hidden; } .lt-notif-panel[aria-hidden="false"] { opacity: 1; @@ -4562,7 +4612,7 @@ body.lt-is-offline .lt-main { margin-top: 2rem; transition: margin-top 0.25s eas align-items: center; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-dim); - font-size: 0.72rem; + font-size: 0.75rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; @@ -4581,7 +4631,7 @@ body.lt-is-offline .lt-main { margin-top: 2rem; transition: margin-top 0.25s eas } .lt-notif-panel-clear:hover { text-decoration: underline; } -.lt-notif-panel-list { max-height: 280px; overflow-y: auto; } +.lt-notif-panel-list { max-height: min(280px, calc(80vh - 110px)); overflow-y: auto; } .lt-notif-item { display: flex; @@ -4611,16 +4661,17 @@ body.lt-is-offline .lt-main { margin-top: 2rem; transition: margin-top 0.25s eas .lt-notif-item-body { flex: 1; min-width: 0; } .lt-notif-item-title { - font-size: 0.76rem; + font-size: 0.78rem; color: var(--text-primary); line-height: 1.4; - white-space: nowrap; overflow: hidden; - text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; } .lt-notif-item--unread .lt-notif-item-title { color: var(--text-primary); font-weight: 600; } .lt-notif-item-time { - font-size: 0.64rem; + font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); @@ -4673,12 +4724,15 @@ body.lt-is-offline .lt-main { margin-top: 2rem; transition: margin-top 0.25s eas background: none; border: none; text-align: left; - font-size: 0.76rem; + font-size: 0.78rem; font-family: var(--font-mono); color: var(--text-secondary); cursor: pointer; transition: background 0.1s, color 0.1s; white-space: nowrap; + min-height: 36px; + display: flex; + align-items: center; } .lt-dropdown-item:hover { background: var(--bg-tertiary); @@ -4699,3 +4753,183 @@ body.lt-is-offline .lt-main { margin-top: 2rem; transition: margin-top 0.25s eas resize: vertical; line-height: 1.5; } + +/* ---------------------------------------------------------------- + 78. MOBILE / RESPONSIVE FIXES v1.1 + Targeted overrides addressing audit findings. + ---------------------------------------------------------------- */ + +/* — Modal max-width cap (prevents 4K-wide modals) — */ +.lt-modal { max-width: 640px; } +@media (max-width: 767px) { .lt-modal { max-width: 96vw; } } +@media (max-width: 479px) { .lt-modal { max-width: 100vw; } } + +/* — Landscape phone: better modal + nav spacing — */ +@media (max-height: 500px) and (orientation: landscape) { + .lt-modal { max-height: calc(100vh - 48px); overflow-y: auto; } + .lt-modal-body { max-height: calc(100vh - 130px); overflow-y: auto; } + .lt-notif-panel-list { max-height: calc(100vh - 140px); } + .lt-header { padding: 0 var(--space-md); } + /* Suppress boot overlay on landscape to save vertical space */ + .lt-boot-overlay { display: none !important; } +} + +/* — Dropdown panels: stay within viewport on SM/XS — */ +@media (max-width: 767px) { + .lt-dropdown-panel { max-width: 90vw; font-size: 0.8rem; } + .lt-dropdown-panel--right { left: auto; right: 0; } + .lt-dropdown-item { font-size: 0.8rem; } + + /* Notification panel: left-safe positioning */ + .lt-notif-panel { right: 0; max-width: 90vw; } + + /* Advanced filter panel: left-aligned to prevent right overflow */ + #adv-filter-panel { left: 0; right: auto; } + + /* Right drawer full-screen on SM */ + .lt-drawer-right { + width: 100vw; + max-width: 100vw; + border-left: none; + border-top: 1px solid var(--border-color); + } + + /* Right drawer body: more compact padding */ + .lt-drawer-right-body { padding: var(--space-sm) var(--space-md); } + + /* Inline split pane → stack vertically on SM */ + .lt-split:not(.lt-split--vertical) { + flex-direction: column; + } + .lt-split:not(.lt-split--vertical) .lt-split-divider { + width: 100%; + height: 6px; + cursor: ns-resize; + margin: 0; + } + .lt-split:not(.lt-split--vertical) .lt-split-divider::before { + top: -6px; bottom: -6px; + left: 0; right: 0; + width: auto; height: auto; + } + .lt-split-pane { flex: none; width: 100% !important; } +} + +/* — XS font-size floors (nothing below 0.72rem = ~11.5px) — */ +@media (max-width: 479px) { + .lt-cmd-group-label { font-size: 0.72rem; } + .lt-cmd-item-label { font-size: 0.78rem; } + .lt-cmd-item-kbd { font-size: 0.72rem; } + .lt-nav-drawer-section { font-size: 0.72rem; } + .lt-frame::before { font-size: 0.65rem; } /* just above retina floor */ + .lt-stat-label { font-size: 0.72rem; } + .lt-section-title { font-size: 0.72rem; } + .lt-chart-axis span { font-size: 0.68rem; } + .lt-dropdown-item { font-size: 0.8rem; min-height: 40px; } + .lt-notif-item-title { font-size: 0.78rem; } + .lt-notif-item-time { font-size: 0.72rem; } + .lt-badge-admin, + .lt-header-user { font-size: 0.7rem; } + /* Hide admin badge on very small screens to save header space */ + .lt-badge-admin { display: none; } +} + +/* — Safe-area insets for notched devices (header-right) — */ +@supports (padding: max(0px)) { + .lt-header-right { + padding-right: max(var(--space-md), env(safe-area-inset-right)); + } + .lt-header { + padding-left: max(var(--space-md), env(safe-area-inset-left)); + padding-right: max(var(--space-md), env(safe-area-inset-right)); + } + /* Bottom toast: respect home indicator */ + #lt-toast-container { + bottom: max(var(--space-md), env(safe-area-inset-bottom)); + } +} + +/* — Header: tighter brand on XS to prevent overflow — */ +@media (max-width: 479px) { + .lt-header { padding: 0 var(--space-sm); gap: var(--space-xs); } + .lt-header-left { gap: var(--space-xs); flex-shrink: 1; min-width: 0; } + .lt-brand-title { + font-size: 0.85rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 110px; + } + .lt-ws-status { display: none; } /* hide WS indicator on XS, save space */ + .lt-header-right { gap: var(--space-xs); flex-shrink: 0; } +} + +/* — Stats grid: never below 2-col, but use auto-fit for flexibility — */ +@media (max-width: 767px) { + .lt-stats-grid { + grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); + } +} + +/* — Lightbox: full-screen on any phone — */ +@media (max-width: 767px) { + .lt-lightbox-overlay { + padding: 0; + background: rgba(0,0,0,0.97); + } + .lt-lightbox-img { + max-width: 100vw; + max-height: calc(100vh - 80px); + border: none; + } + .lt-lightbox-nav-prev, + .lt-lightbox-nav-next { + bottom: 1rem; + top: auto; + transform: none; + font-size: 1.2rem; + } + .lt-lightbox-nav-prev { left: 1rem; } + .lt-lightbox-nav-next { right: 1rem; } +} + +/* — Wizard steps: compact on XS — */ +@media (max-width: 479px) { + .lt-wizard-steps { + overflow-x: auto; + padding-bottom: 4px; + scrollbar-width: none; + } + .lt-wizard-steps::-webkit-scrollbar { display: none; } + .lt-wizard-step-label { display: none; } /* show only numbers on XS */ + .lt-wizard-step.active .lt-wizard-step-label { display: block; } +} + +/* — Timeline: tighter on XS — */ +@media (max-width: 479px) { + .lt-timeline-item { padding: var(--space-xs) 0 var(--space-xs) var(--space-md); } + .lt-timeline-item::before { left: 0; } + .lt-timeline-meta { font-size: 0.72rem; flex-wrap: wrap; } + .lt-timeline-body { font-size: 0.75rem; } +} + +/* — Code blocks: prevent overflow and fix font on mobile — */ +@media (max-width: 767px) { + .lt-code-block { font-size: 0.75rem; overflow-x: auto; } + .lt-code-block pre { white-space: pre; word-break: normal; } +} + +/* — Pagination: 44px touch targets on coarse pointer — */ +@media (pointer: coarse) { + .lt-page-btn { + min-height: 44px; + min-width: 44px; + font-size: 0.85rem; + } +} + +/* — 4K: cap stats grid at 8 columns but use auto-fit — */ +@media (min-width: 2560px) { + .lt-stats-grid { grid-template-columns: repeat(8, 1fr); max-width: 100%; } + .lt-modal { max-width: 800px; } +} diff --git a/base.html b/base.html index 8051cec..bad21b2 100644 --- a/base.html +++ b/base.html @@ -119,7 +119,7 @@
- +