Getting there!
The sidebar rendered stacked below the content instead of beside it. But the visible symptom was misleading. Through instrumentation I figured out:
- calc(100% - 270px) resolved correctly to 700px for content; sidebar to 250px.
- Both fit on one flex line (700 + 250 = 950 ≤ 970 available) — no wrapping issue.
- Yet content still ballooned to full width (970) with the sidebar below.
The real cause was one level down: the entire page's flex layout was silently failing and falling back to block flow — the log had thousands of FLEXSAFE collect failed → block fallback.
NetSurf's block-fallback path already tolerated this exact failure (fixes168c — zero-height the failed child and keep going), but the main flex path didn't. I made the two main-path abort sites (place_line_items_main and base_and_main_sizes) equally tolerant: when one item's content layout fails, degrade just that item to zero height and keep the flex line intact, instead of collapsing the whole container. That restored flex page-wide - sidebar beside content, node rows as rows.

The sidebar rendered stacked below the content instead of beside it. But the visible symptom was misleading. Through instrumentation I figured out:
- calc(100% - 270px) resolved correctly to 700px for content; sidebar to 250px.
- Both fit on one flex line (700 + 250 = 950 ≤ 970 available) — no wrapping issue.
- Yet content still ballooned to full width (970) with the sidebar below.
The real cause was one level down: the entire page's flex layout was silently failing and falling back to block flow — the log had thousands of FLEXSAFE collect failed → block fallback.
NetSurf's block-fallback path already tolerated this exact failure (fixes168c — zero-height the failed child and keep going), but the main flex path didn't. I made the two main-path abort sites (place_line_items_main and base_and_main_sizes) equally tolerant: when one item's content layout fails, degrade just that item to zero height and keep the flex line intact, instead of collapsing the whole container. That restored flex page-wide - sidebar beside content, node rows as rows.


