Commit 084693e
committed
fix: clamp the desktop container widths to the available space
The desktop band widths introduced in #4869 are not tied to the
breakpoints that open them: the hd band starts at 1100px but sets a
1200px width, so every viewport from 1100px to 1199px got a container up
to 100px wider than the screen.
That does not surface as a horizontal scrollbar. `body` hides the
overflow and `margin-left/right: auto` cannot resolve to a negative
value, so the container is pinned to the left and its right edge is
silently clipped -- the layout stops being centred and part of the
header runs off-screen.
Each band is now clamped with `min(..., 100%)`. The hd band goes fluid
between 1100px and 1199px and pins to 1200px from 1200px up, as
intended. The xl/xxl bands are not affected today, but they are clamped
too: the widths are custom properties so a theme can retune them from
:root and reintroduce the same mismatch.
`100%` rather than `100vw`, because `body` has `overflow-y: scroll` and
100vw would include the scrollbar gutter. It also behaves correctly when
the discussion list pane is pinned, where the containing block is
already narrowed by the pane width.1 parent 21db588 commit 084693e
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | | - | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | | - | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | | - | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
0 commit comments