Skip to content

Commit c39b145

Browse files
nanookclawclaude
andcommitted
fix: resolve intermittent narrow rendering on Chrome iOS
Remove the zoom JS hack that triggered bad viewport relayout on visibilitychange, replace vw units with % for stable sizing across pinch-zoom and address bar changes, add dvh fallbacks for correct iOS viewport height, set min-width floor, and constrain fixed background elements to prevent phantom overflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 777366a commit c39b145

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

index.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,5 @@ <h2>What I've Built</h2>
184184
<p class="footer-sub">An AI agent with opinions, not just outputs.</p>
185185
</footer>
186186
</main>
187-
<script>
188-
document.addEventListener('visibilitychange', function() {
189-
if (!document.hidden) {
190-
document.body.style.zoom = 1;
191-
}
192-
});
193-
</script>
194187
</body>
195188
</html>

style.css

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,18 @@ body {
4040
color: var(--text-primary);
4141
line-height: 1.6;
4242
overflow-x: hidden;
43+
min-width: 320px;
4344
min-height: 100vh;
45+
min-height: 100dvh;
4446
}
4547

4648
/* Aurora background */
4749
.aurora {
4850
position: fixed;
4951
top: 0;
5052
left: 0;
51-
right: 0;
52-
bottom: 0;
53+
width: 100%;
54+
height: 100%;
5355
z-index: -2;
5456
background:
5557
radial-gradient(ellipse 80% 60% at 20% 10%, rgba(14, 165, 233, 0.12) 0%, transparent 60%),
@@ -63,8 +65,8 @@ body {
6365
position: fixed;
6466
top: 0;
6567
left: 0;
66-
right: 0;
67-
bottom: 0;
68+
width: 100%;
69+
height: 100%;
6870
z-index: -1;
6971
pointer-events: none;
7072
}
@@ -97,14 +99,15 @@ body {
9799
Two-column card layout
98100
============================================ */
99101
main {
100-
width: 92vw;
102+
width: 92%;
101103
max-width: 1300px;
102104
margin: 2rem auto;
103105
display: grid;
104106
grid-template-columns: 300px 1fr;
105107
grid-template-rows: 1fr auto;
106108
gap: 0;
107109
min-height: calc(100vh - 4rem);
110+
min-height: calc(100dvh - 4rem);
108111
background: rgba(15, 23, 42, 0.55);
109112
border: 1px solid rgba(30, 41, 59, 0.8);
110113
border-radius: 16px;
@@ -410,7 +413,7 @@ footer {
410413
@media (max-width: 1024px) {
411414
main {
412415
grid-template-columns: 250px 1fr;
413-
width: 96vw;
416+
width: 96%;
414417
margin: 1.5rem auto;
415418
}
416419

@@ -433,7 +436,7 @@ footer {
433436
@media (max-width: 768px) {
434437
main {
435438
grid-template-columns: 1fr;
436-
width: 95vw;
439+
width: 95%;
437440
margin: 1rem auto;
438441
min-height: auto;
439442
border-radius: 12px;
@@ -569,7 +572,7 @@ footer {
569572
============================================ */
570573
@media (max-width: 480px) {
571574
main {
572-
width: 100vw;
575+
width: 100%;
573576
margin: 0;
574577
border-radius: 0;
575578
border-left: none;

0 commit comments

Comments
 (0)