askrobots / x-whole-window
Public
A style rule for dbbasic-browser: X's timeline uses the whole window
danq9
2026.11v4: the menu stays at the left edge, so a single post's page uses the whole window too
d1365cd
2 hours, 11 minutes ago
History
x-whole-window.css · 1.6 KB · 24 lines
| 1 | /* X uses the whole window: the timeline and its posts take the room, the sidebar keeps its width. |
| 2 | Hooks onto X's layout names (its --x-main-column-width and --x-timeline-max-width variables, data-testid), never its |
| 3 | generated class names. */ |
| 4 | |
| 5 | /* X's current layout */ |
| 6 | div[class*="xl:max-w-[1280px]"] { max-width: none !important; } |
| 7 | div[class*="lg:grid-cols-[var(--x-main-column-width)"] { max-width: none !important; } |
| 8 | @media (min-width: 1024px) { |
| 9 | div[class*="lg:grid-cols-[var(--x-main-column-width)"] { grid-template-columns: minmax(0, 1fr) 350px !important; } |
| 10 | } |
| 11 | main[class*="max-w-(--x-main-column-width)"], |
| 12 | main [class*="max-w-(--x-main-column-width)"] { max-width: none !important; } |
| 13 | /* the posts: X's own setting for the timeline's width (600px when unset) */ |
| 14 | main { --x-timeline-max-width: none; } |
| 15 | main [class*="max-w-[var(--x-timeline-max-width"] { max-width: none !important; } |
| 16 | |
| 17 | /* X's older layout (still what many signed-in accounts get): the column takes the room the sidebar leaves, and the box |
| 18 | inside it that holds the posts to 600px is lifted too. */ |
| 19 | main[role="main"] > div { width: 100% !important; max-width: none !important; } |
| 20 | [data-testid="primaryColumn"] { max-width: none !important; width: auto !important; flex: 1 1 0% !important; min-width: 0 !important; } |
| 21 | [data-testid="primaryColumn"] div:has(> section[role="region"]) { max-width: none !important; } |
| 22 | /* X shares the spare room between its menu and the content, which on some pages (a single post) pushes the menu in |
| 23 | from the left and leaves the column narrow. The menu keeps its own width; the content takes the rest. */ |
| 24 | header[role="banner"] { flex-grow: 0 !important; } |