| 1 |
/** |
| 2 |
* OpenStation — Solo window rendering mode. |
| 3 |
* |
| 4 |
* One window, no desk. Loaded only on a `?openstation_solo=` request |
| 5 |
* (see `includes/solo-window.php`); a normal shell never downloads it. |
| 6 |
* |
| 7 |
* ## What this sheet does NOT do |
| 8 |
* |
| 9 |
* It does not build a second, simpler window. Every rule here hides a |
| 10 |
* surface or removes a decoration — the window itself is the same |
| 11 |
* `.os-window` the desktop paints, wearing the same theme, running the |
| 12 |
* same render callback, carrying the same title-bar buttons its plugin |
| 13 |
* registered. That is the whole point of solo mode: what the user gets |
| 14 |
* is the window they already had, not a lookalike of it. |
| 15 |
* |
| 16 |
* ## What this sheet leaves alone |
| 17 |
* |
| 18 |
* The title bar. Solo mode is generic — an embed or a kiosk keeps its |
| 19 |
* title bar, because nothing else on the page offers a way to move, |
| 20 |
* close or identify the window. An embedder that supplies its own |
| 21 |
* chrome (the native desktop host does; the OS frame is real chrome |
| 22 |
* with real traffic lights) layers its own sheet on top and takes ours |
| 23 |
* away there. Doing that here would leave the generic case chromeless |
| 24 |
* and stranded. |
| 25 |
*/ |
| 26 |
|
| 27 |
/* |
| 28 |
* Kill the desk. Wallpaper, dock, icon rail, widgets, Mio, sticky |
| 29 |
* notes: all of them are the *desktop*, and in solo mode there isn't |
| 30 |
* one. `display: none` rather than `visibility` so nothing keeps a |
| 31 |
* layout box, an animation frame, or a pointer target. |
| 32 |
*/ |
| 33 |
body.os-solo .os-wallpaper, |
| 34 |
body.os-solo .os-dock, |
| 35 |
body.os-solo .os-icons, |
| 36 |
/* |
| 37 |
* Both icon layouts, not just one. `.os-icons` is the Classic grid; |
| 38 |
* the Spatial layout paints its `<os-tile>` placements into |
| 39 |
* `.os-files-layer` instead, and Spatial is what a stock install |
| 40 |
* actually shows. Missing it left the rail painted under every solo |
| 41 |
* window — invisible while a window covered it, a flash on every boot |
| 42 |
* before one landed, and fully on show when the requested window did |
| 43 |
* not exist. It also kept exactly the three things the `display: none` |
| 44 |
* above is chosen to deny: a layout box, animation frames, and live |
| 45 |
* drop targets. |
| 46 |
*/ |
| 47 |
body.os-solo .os-files-layer, |
| 48 |
body.os-solo .os-widgets, |
| 49 |
body.os-solo .os-mio, |
| 50 |
body.os-solo .os-mio-panel, |
| 51 |
body.os-solo .os-notes, |
| 52 |
body.os-solo .os-dock-peek { |
| 53 |
display: none !important; |
| 54 |
} |
| 55 |
|
| 56 |
/* |
| 57 |
* The admin bar goes too. It is the desk's chrome, not the window's: |
| 58 |
* in a surface asked to hold exactly one thing, a strip of site-wide |
| 59 |
* navigation across the top is the desk sneaking back in — and its |
| 60 |
* "Switch to Classic Admin" link would navigate the embedder's window |
| 61 |
* clean out of the window it was given. |
| 62 |
* |
| 63 |
* `html.wp-toolbar` carries a `padding-top` for a bar that is no |
| 64 |
* longer painted, and plugins position UI against |
| 65 |
* `--wp-admin--admin-bar--height`; both are rebound to zero so the |
| 66 |
* window's own chrome math resolves against what is actually there. |
| 67 |
* Same treatment `chromeless.css` gives an iframe, for the same reason. |
| 68 |
*/ |
| 69 |
body.os-solo #wpadminbar { |
| 70 |
display: none !important; |
| 71 |
} |
| 72 |
|
| 73 |
html.wp-toolbar:has( body.os-solo ) { |
| 74 |
padding-top: 0 !important; |
| 75 |
--wp-admin--admin-bar--height: 0px; |
| 76 |
--wp-admin--admin-bar--position-offset: 0px; |
| 77 |
} |
| 78 |
|
| 79 |
/* |
| 80 |
* The shell fills its viewport. With the bar gone the usual 32px inset |
| 81 |
* would leave a dark band along the top. |
| 82 |
*/ |
| 83 |
body.os-solo .os-shell { |
| 84 |
inset-block-start: 0; |
| 85 |
background: var( --os-ui-bg, #1d2327 ); |
| 86 |
} |
| 87 |
|
| 88 |
/* No dock at the bottom means no room reserved for one. */ |
| 89 |
body.os-solo .os-area { |
| 90 |
padding-bottom: 0; |
| 91 |
} |
| 92 |
|
| 93 |
/* |
| 94 |
* One more rule lives next to these and is NOT in this file: the one |
| 95 |
* that hides every window except the one this surface was booted to |
| 96 |
* paint. Its selector needs that window's id, which is only known per |
| 97 |
* request, so `includes/render/assets.php` emits it inline. Without it |
| 98 |
* a second window — a game launched from a freed Games hub — lands on |
| 99 |
* top of the first, because of the rule directly below. |
| 100 |
*/ |
| 101 |
|
| 102 |
/* |
| 103 |
* The single window fills the desk. Positioned rather than laid out, |
| 104 |
* so the window manager's own geometry writes — which still run, this |
| 105 |
* is the real window class — are overridden rather than fought with. |
| 106 |
*/ |
| 107 |
body.os-solo .os-window { |
| 108 |
inset-block-start: 0 !important; |
| 109 |
inset-inline-start: 0 !important; |
| 110 |
width: 100% !important; |
| 111 |
height: 100% !important; |
| 112 |
border: 0; |
| 113 |
border-radius: 0; |
| 114 |
box-shadow: none; |
| 115 |
transform: none !important; |
| 116 |
} |
| 117 |
|