Skip to content

Commit b45a39c

Browse files
committed
fix: stop horizontal overflow on narrow viewports
At 390x844 the document scrolled sideways to 566px. Measured by hiding elements in turn: the nav contributed 87px and, once the nav wrapped, the crate and performance tables contributed the rest. - .nav-inner and .nav-links now wrap below 640px, so seven links flow instead of forcing one 411px row. - The performance table gets its own class. Its first column holds prose such as "Inference latency", and the crate-table nowrap rule that suits package names made it 479px wide. - Long package names such as terraphim-automata-node-rs wrap with overflow-wrap: anywhere rather than setting the table width. All changes are inside the existing 640px breakpoint; desktop layout is unchanged (nav still one 28px row at 1440px). Verified: scrollWidth 566 -> 390 at 390px, no element past the viewport, all seven nav links visible and unclipped, no overflow at 768px or 1440px, HTML nesting valid, close count still 55. Refs #155
1 parent 37c7534 commit b45a39c

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

‎index.html‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,21 @@
260260

261261
/* --- RESPONSIVE --- */
262262
@media (max-width: 640px) {
263-
.nav-links { gap: 0.75rem; font-size: 0.8rem; }
263+
.nav-inner { flex-wrap: wrap; justify-content: center; gap: 0.5rem; padding: 0 1rem; }
264+
.nav-links { flex-wrap: wrap; justify-content: center; gap: 0.5rem 0.75rem; font-size: 0.8rem; }
264265
.hero { padding: 3rem 1rem 2rem; }
265266
.stats { grid-template-columns: repeat(2, 1fr); }
266267
.arch-layer { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
268+
/* The performance table has four prose columns; the crate tables hold
269+
package names and rely on nowrap. Let this one wrap and shrink. */
270+
.perf-table td:first-child { white-space: normal; }
271+
.perf-table th, .perf-table td { padding: 0.5rem 0.4rem; }
272+
.perf-table { font-size: 0.8rem; }
273+
/* Long package names such as terraphim-automata-node-rs cannot fit a
274+
phone width on one line. Allow them to break rather than scroll. */
275+
.crate-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
276+
.crate-table th, .crate-table td { padding: 0.5rem 0.4rem; }
277+
.crate-table { font-size: 0.8rem; }
267278
}
268279
</style>
269280
</head>
@@ -668,7 +679,7 @@ <h3><i class="fa-solid fa-globe" style="color: #654ff0"></i> WebAssembly</h3>
668679
<h2>Performance Comparison</h2>
669680
<p>From ML pipeline to nanosecond inference</p>
670681
</div>
671-
<table class="crate-table" style="max-width: 700px; margin: 0 auto;">
682+
<table class="crate-table perf-table" style="max-width: 700px; margin: 0 auto;">
672683
<thead>
673684
<tr><th>Metric</th><th>Traditional ML</th><th>The Pattern</th><th>Terraphim AI</th></tr>
674685
</thead>

0 commit comments

Comments
 (0)