Automatic viewport compaction, last-column stretching, and per-node width hooks without per-screen layout code.
Responsive behavior in STRVCT is not a separate rendering mode or set of CSS breakpoints. The same master-detail composition that produces a multi-column Miller view on a wide desktop produces a one-column stack with breadcrumbs on a phone, because SvStackView measures available width and automatically collapses columns that would overflow the viewport.
This behavior—automatic collapsing—falls out of the same primitives used for navigation at any width; there is zero separate "mobile" code path in the view hierarchy.
compactNavAsNeeded)SvStackView.compactNavAsNeeded() walks the stack chain from outermost (leftmost) to innermost (rightmost), summing target widths against available viewport space (topViewWidth()):
uncollapse()d and displayed.collapse()d (display: none). The current (deepest) column stays visible as long as possible.updateWidthForWindow)SvNavView.updateWidthForWindow() determines width for visible columns:
targetWidth() >= windowWidth, the column takes width: 100%.windowWidth < targetWidth * 2, it stretches to width: 100% to fill available slack instead of leaving dead space.Domain nodes can influence layout without writing custom view code:
| Node Method | Purpose & Behavior |
|---|---|
nodeMinTileWidth() | Declares a minimum tile width floor for the column. Useful for wide property inspectors. |
nodeFillsRemainingWidth() | When true, forces the column to stretch to 100% width whenever it is the last visible column. Useful for document editors or chat logs. |
SvWebBrowserWindow.shared().width(): Returns current viewport width in CSS pixels. Always use this for layout and compaction decisions.SvWebBrowserWindow.shared().isOnMobile(): User-agent string match (iPhone/Android). Use only for touch-gesture or platform-specific permissions, never for column width sizing.On iPhone Safari, CSS 100vh units fail to subtract the animated URL bar area (~40px overflow). The reliable fix is binding root page height to window.visualViewport.height during visualViewport.resize and orientationchange events.