diff --git a/apps/web/index.html b/apps/web/index.html index b72a9d3d7d106..74515533e8d85 100644 --- a/apps/web/index.html +++ b/apps/web/index.html @@ -714,7 +714,96 @@ background-repeat: repeat; background-size: var(--surface-grain-size); } + /* A narrow window, where T3's left panel is a modal sheet (sidebar.tsx, SIDEBAR_MOBILE_QUERY): + the conversation takes the whole width without the rail, the open left panel carries the + rail at its left edge, and the open right panel takes the whole width. The script below moves the rail into the panel while it is open, so + the rail is part of the dialog for the keyboard and screen readers and slides with it. */ + @media (max-width: 767px) { + #root { + padding-left: 0; + } + body > lazurio-rail:defined:not([data-lazurio-dialog-open]) { + display: none; + } + /* The rail is no longer #root's sibling while it is in the panel; T3's fixed controls stay + contained all the same, below the panel. */ + :root:has(lazurio-rail:defined) #root [data-slot="sidebar-wrapper"] { + contain: layout paint; + } + [data-mobile="true"][data-sidebar="sidebar"]:has(> lazurio-rail:defined) { + padding-left: var(--lazurio-rail-width, 0px); + } + /* The right panel (RightPanelSheet.tsx, the one other sheet) takes the whole screen: no + sliver of the conversation beside it. Its own toggle closes it, back to the conversation. */ + :root:has(lazurio-rail:defined) [data-slot="sheet-popup"]:not([data-mobile]) { + width: 100vw; + min-width: 0; + max-width: none; + border-inline-start: 0; + padding-inline-start: env(safe-area-inset-left); + } + } +