fix: Mobile-Layout — Tabs scrollen, kein horizontaler Overflow
- html/body: overflow-x: hidden verhindert seitlichen Scroll - Tabs: overflow-x: auto + white-space: nowrap + flex-shrink: 0 → horizontal scrollbar-frei auf Handy - Header: min-width: 0, flex-shrink: 0 für Pill, Text-Overflow - main: padding 16px statt 20px - energy-wrap: width: 100%, kwh-card min-width: 0 - @media ≤520px: sensor-grid, settings, header-icon ausgeblendet Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,32 +13,39 @@
|
|||||||
--radius: 10px;
|
--radius: 10px;
|
||||||
}
|
}
|
||||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
html, body { max-width: 100vw; overflow-x: hidden; }
|
||||||
body { background: var(--bg); color: var(--text);
|
body { background: var(--bg); color: var(--text);
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||||
font-size: 14px; min-height: 100vh; }
|
font-size: 14px; min-height: 100vh; }
|
||||||
|
|
||||||
header { display: flex; align-items: center; gap: 12px;
|
header { display: flex; align-items: center; gap: 10px;
|
||||||
padding: 16px 20px; background: var(--surface);
|
padding: 12px 16px; background: var(--surface);
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
position: sticky; top: 0; z-index: 100; }
|
position: sticky; top: 0; z-index: 100;
|
||||||
header h1 { font-size: 16px; font-weight: 600; }
|
min-width: 0; }
|
||||||
header .subtitle { font-size: 12px; color: var(--text-dim); }
|
header h1 { font-size: 16px; font-weight: 600; white-space: nowrap; }
|
||||||
.status-pill { margin-left: auto; display: flex; gap: 8px; align-items: center; }
|
header .subtitle { font-size: 12px; color: var(--text-dim);
|
||||||
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||||
|
.status-pill { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
|
||||||
.pill { display: flex; align-items: center; gap: 5px; padding: 4px 10px;
|
.pill { display: flex; align-items: center; gap: 5px; padding: 4px 10px;
|
||||||
border-radius: 20px; font-size: 12px; font-weight: 600;
|
border-radius: 20px; font-size: 12px; font-weight: 600;
|
||||||
background: var(--surface2); border: 1px solid var(--border); }
|
background: var(--surface2); border: 1px solid var(--border); white-space: nowrap; }
|
||||||
.pill.ok { color: var(--green); border-color: var(--green); }
|
.pill.ok { color: var(--green); border-color: var(--green); }
|
||||||
.pill.err { color: var(--red); border-color: var(--red); }
|
.pill.err { color: var(--red); border-color: var(--red); }
|
||||||
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor;
|
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor;
|
||||||
animation: pulse 2s infinite; }
|
animation: pulse 2s infinite; }
|
||||||
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
|
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
|
||||||
|
|
||||||
main { padding: 20px; max-width: 1100px; margin: 0 auto; }
|
main { padding: 16px; max-width: 1100px; margin: 0 auto; }
|
||||||
.tabs { display: flex; gap: 4px; margin-bottom: 20px;
|
.tabs { display: flex; gap: 2px; margin-bottom: 16px;
|
||||||
border-bottom: 1px solid var(--border); }
|
border-bottom: 1px solid var(--border);
|
||||||
.tab { padding: 10px 16px; cursor: pointer; color: var(--text-dim);
|
overflow-x: auto; -webkit-overflow-scrolling: touch;
|
||||||
|
scrollbar-width: none; }
|
||||||
|
.tabs::-webkit-scrollbar { display: none; }
|
||||||
|
.tab { padding: 10px 14px; cursor: pointer; color: var(--text-dim);
|
||||||
font-weight: 500; border-bottom: 2px solid transparent;
|
font-weight: 500; border-bottom: 2px solid transparent;
|
||||||
margin-bottom: -1px; transition: color .15s, border-color .15s; }
|
margin-bottom: -1px; transition: color .15s, border-color .15s;
|
||||||
|
white-space: nowrap; flex-shrink: 0; }
|
||||||
.tab.active { color: var(--accent); border-color: var(--accent); }
|
.tab.active { color: var(--accent); border-color: var(--accent); }
|
||||||
.tab:hover { color: var(--text); }
|
.tab:hover { color: var(--text); }
|
||||||
.panel { display: none; }
|
.panel { display: none; }
|
||||||
@@ -137,11 +144,11 @@
|
|||||||
.info-chip span { color: var(--text); font-weight: 600; }
|
.info-chip span { color: var(--text); font-weight: 600; }
|
||||||
|
|
||||||
/* Energy Dashboard */
|
/* Energy Dashboard */
|
||||||
.energy-wrap { max-width: 580px; margin: 0 auto; }
|
.energy-wrap { max-width: 580px; margin: 0 auto; width: 100%; }
|
||||||
.energy-svg-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
|
.energy-svg-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; width: 100%; }
|
||||||
.energy-kwh { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 10px; }
|
.energy-kwh { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
|
||||||
.kwh-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 8px; text-align: center; }
|
.kwh-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 6px; text-align: center; min-width: 0; }
|
||||||
.kwh-card .kv { font-size: 18px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
|
.kwh-card .kv { font-size: 17px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
|
||||||
.kwh-card .kl { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
|
.kwh-card .kl { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
|
||||||
.flow-dot { /* dots via animateMotion — no CSS animation needed */ }
|
.flow-dot { /* dots via animateMotion — no CSS animation needed */ }
|
||||||
|
|
||||||
@@ -177,6 +184,16 @@
|
|||||||
background:none; border:none; color:var(--text-dim); padding:0; }
|
background:none; border:none; color:var(--text-dim); padding:0; }
|
||||||
.wz-skip:hover { color:var(--text); }
|
.wz-skip:hover { color:var(--text); }
|
||||||
|
|
||||||
|
@media (max-width: 520px) {
|
||||||
|
main { padding: 10px; }
|
||||||
|
.settings-section { max-width: 100%; }
|
||||||
|
.sensor-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
|
||||||
|
.inv-list { grid-template-columns: 1fr; }
|
||||||
|
.kwh-card .kv { font-size: 15px; }
|
||||||
|
.flash-section { max-width: 100% !important; }
|
||||||
|
header svg { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
/* Flash-Wizard */
|
/* Flash-Wizard */
|
||||||
.flash-section { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px; max-width:560px; }
|
.flash-section { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px; max-width:560px; }
|
||||||
.flash-section h3 { font-size:13px; font-weight:600; color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em; margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid var(--border); }
|
.flash-section h3 { font-size:13px; font-weight:600; color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em; margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid var(--border); }
|
||||||
|
|||||||
Reference in New Issue
Block a user