vers. 3.0.4 - guscio e barre come nella 3.0.0, pagina di diagnostica

Con l'icona installata la 3.0.0 si vedeva bene: il guscio torna in
flusso con height 100dvh (position: relative per i figli assoluti),
topbar blu, nessuno sfondo forzato su html, theme-color #1c2555;
rimossi il rilevamento del viewport ridotto e la classe vp-ridotto.
Aggiunto debug.html: riquadri con i confini di fixed inset 0, 100dvh,
100vh e area sicura, più i numeri riportati dal dispositivo.
Cache del service worker v10.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
alexspeakerandClaude Fable 5.1 committed 2026-11-06 16:03:42 +01:00
1 parent 394285b016
commit c9fecb068b
7 files changed
+79 -57

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8">
<title>RPIGroup Play - diagnostica viewport</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="theme-color" content="#1c2555">
<style>
html, body { margin: 0; height: 100%; background: #0b0e20; color: #fff; font: 13px/1.4 -apple-system, system-ui, sans-serif; overflow: hidden; }
/* Riquadri con i confini di ogni misura: dove finiscono, lì finisce quella misura */
.box { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; box-sizing: border-box; }
#fixed { position: fixed; inset: 0; border: 4px solid #e53935; } /* rosso: position fixed inset 0 */
#dvh { height: 100dvh; border: 4px dashed #43a047; margin: 8px; } /* verde: 100dvh */
#vh { height: 100vh; border: 4px dotted #1e88e5; margin: 16px; } /* blu: 100vh */
#safe { position: fixed; inset: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#safe::before { content: ""; display: block; height: 100%; border: 3px solid #fdd835; box-sizing: border-box; } /* giallo: area sicura */
#bottom { position: fixed; left: 0; right: 0; bottom: 0; background: #e53935; text-align: center; padding: 4px; font-weight: 700; }
#info { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.85); padding: 12px 14px; border-radius: 10px; white-space: pre; font-family: ui-monospace, Menlo, monospace; font-size: 12px; z-index: 10; }
#legend { position: fixed; top: 70px; left: 24px; right: 24px; z-index: 10; font-size: 12px; }
</style>
</head>
<body>
<div id="fixed" class="box"></div>
<div id="dvh" class="box"></div>
<div id="vh" class="box"></div>
<div id="safe"></div>
<div id="bottom">position: fixed; bottom: 0</div>
<div id="legend">rosso = fixed inset 0 · verde = 100dvh · blu = 100vh · giallo = area sicura</div>
<pre id="info">misuro…</pre>
<script>
function probe() {
var cs = getComputedStyle(document.getElementById('safe'));
var vv = window.visualViewport;
var standalone = navigator.standalone === true || matchMedia('(display-mode: standalone)').matches;
var righe = [
'UA: ' + navigator.userAgent.replace(/^Mozilla\/5\.0 /, '').slice(0, 60),
'standalone: ' + standalone + ' display-mode standalone: ' + matchMedia('(display-mode: standalone)').matches,
'inner: ' + window.innerWidth + ' x ' + window.innerHeight,
'outer: ' + window.outerWidth + ' x ' + window.outerHeight,
'screen: ' + screen.width + ' x ' + screen.height + ' avail: ' + screen.availWidth + ' x ' + screen.availHeight,
'documentElement.clientHeight: ' + document.documentElement.clientHeight,
'visualViewport: ' + (vv ? Math.round(vv.width) + ' x ' + Math.round(vv.height) + ' offsetTop ' + Math.round(vv.offsetTop) + ' scale ' + vv.scale : 'n/d'),
'safe-area top/right/bottom/left: ' + [cs.paddingTop, cs.paddingRight, cs.paddingBottom, cs.paddingLeft].join(' / '),
'100dvh box: ' + document.getElementById('dvh').getBoundingClientRect().height + ' 100vh box: ' + document.getElementById('vh').getBoundingClientRect().height,
'fixed box bottom: ' + Math.round(document.getElementById('fixed').getBoundingClientRect().bottom),
'devicePixelRatio: ' + window.devicePixelRatio
];
document.getElementById('info').textContent = righe.join('\n');
}
probe();
window.addEventListener('resize', probe);
if (window.visualViewport) window.visualViewport.addEventListener('resize', probe);
setTimeout(probe, 800);
</script>
</body>
</html>