PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 0.9.8
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v0.9.8
1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 All 34 releases
desktop-mode / assets / css / window-overview.css

window-overview.css in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 0.9.8, at assets/css/window-overview.css

485 lines 14.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Desktop Mode — Overview.
3 *
4 * Zoom-out grid view: windows transform into thumbnails, floating
5 * labels sit above them, and a top bar lists every virtual desktop
6 * with one tile per space plus a "+" to add a new one. The dock
7 * collapses in parallel with the enter transition.
8 *
9 * Windows keep their `left/top/width/height` intact; only `transform`
10 * animates (translate + scale) so the layout change is a GPU
11 * composite, not a reflow. `transform-origin: top left` makes
12 * translate + scale compose cleanly — a target coordinate maps to
13 * the window's top-left corner pre-scale. Iframes go
14 * `pointer-events: none` inside overview so clicks hit the window
15 * wrapper (and bubble to the desktop-area click handler) instead of
16 * the iframe content, which would otherwise eat the click.
17 *
18 * Base chrome lives in window-chrome.css; non-overview state classes
19 * live in window-states.css.
20 *
21 * @since 6.9.0
22 */
23 .desktop-mode-area--overview {
24 /* Darken the backdrop and tint it so windows feel like they're
25 * floating over a neutral canvas, not the wallpaper. */
26 background-color: var( --wpd-scrim, rgba( 0, 0, 0, 0.45 ) );
27 transition: background-color 0.28s ease;
28 }
29
30 .desktop-mode-window--overview {
31 transform-origin: top left;
32 transition:
33 transform 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
34 box-shadow 0.2s ease,
35 opacity 0.2s ease;
36 cursor: pointer;
37 /* Hover effects apply a thick outline rather than another
38 * transform (which would fight the layout's own transform).
39 * Box-shadow is composite-only, so it's cheap. */
40 box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.35 );
41 /* Overview thumbnails are click targets, not reading surfaces —
42 * suppress text selection so a drag across a thumbnail doesn't
43 * highlight paragraphs inside the title bar / native body. */
44 user-select: none;
45 -webkit-user-select: none;
46 }
47
48 /*
49 * While in overview, treat each window as a single click target —
50 * every inner element (title bar, buttons, iframe, native body) goes
51 * transparent to pointer events so drags/taps never start a drag,
52 * trip a close button, or launch an in-iframe action. Only the
53 * window's root element receives pointer events; our desktop-level
54 * pointerdown/pointerup handlers drive selection from there.
55 */
56 .desktop-mode-window--overview * {
57 pointer-events: none;
58 }
59
60 .desktop-mode-window--overview {
61 pointer-events: auto;
62 }
63
64 .desktop-mode-window--overview:hover {
65 box-shadow:
66 0 14px 38px rgba( 0, 0, 0, 0.45 ),
67 0 0 0 3px var( --wp-admin-theme-color, #2271b1 );
68 z-index: 1;
69 }
70
71 /*
72 * Minimized windows shown in overview are rendered slightly dimmed
73 * so the user can distinguish them from active windows at a glance.
74 */
75 .desktop-mode-window--overview.desktop-mode-window--minimized {
76 opacity: 0.6;
77 }
78
79 /*
80 * Mission-Control-style dimming: once ANY window is hovered, every
81 * OTHER window dims and desaturates slightly — creating a clear
82 * focal point without needing the hovered one to grow or lift.
83 * `:has()` lands in every evergreen browser we target (Chrome 105,
84 * Safari 15.4, Firefox 121+); older engines miss the dimming but
85 * keep the accent-ring affordance, so it degrades gracefully.
86 */
87 .desktop-mode-area--overview:has( .desktop-mode-window--overview:hover )
88 .desktop-mode-window--overview:not( :hover ) {
89 opacity: 0.5;
90 filter: brightness( 0.75 );
91 transition:
92 transform 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
93 opacity 0.18s ease,
94 filter 0.18s ease;
95 }
96
97 /*
98 * Dock slides out smoothly during overview — width collapses (the
99 * flex row reflows so the area grows into the freed space) while
100 * the dock itself slides left and fades. `display: none` would have
101 * been abrupt in both directions; animating the flex width does the
102 * heavy lifting and the user sees a single continuous motion.
103 *
104 * `pointer-events: none` comes in immediately on overview enter so
105 * stray clicks mid-animation can't open a window behind the user's
106 * back. `overflow: hidden` is scoped to the collapsed state so the
107 * shrinking dock doesn't leak icons past its boundary — outside
108 * overview, the dock keeps `overflow: visible` from dock.css so
109 * per-tile "+ open another" chips can float past the edge.
110 */
111 .desktop-mode-dock {
112 transition:
113 width 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
114 min-width 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
115 padding 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
116 transform 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
117 opacity 0.22s ease;
118 }
119
120 /*
121 * Collapse EVERY dock (bottom + side rails, Classic / Unified /
122 * Spatial layouts alike) when overview is active.
123 *
124 * The placement-specific width rules in dock.css —
125 * `.desktop-mode-dock[ data-desktop-mode-dock-placement="left" ]
126 * { width: var( --desktop-mode-dock-width ); }` — share equal
127 * specificity with `.desktop-mode-shell--overview .desktop-mode-dock`
128 * (two classes / class+attr) and load LATER in the cascade, so
129 * without `!important` the side rail keeps its placement width
130 * and stays visible during overview. The bottom dock happens to
131 * lack a placement-attr-keyed width override so it collapsed
132 * fine; the side rail did not — caught by the regression
133 * screenshot.
134 *
135 * `!important` is the right tool here: this rule is a transient,
136 * mode-scoped override (overview screen only) of a layout-mode
137 * default, and we want it to win unconditionally.
138 */
139 .desktop-mode-shell--overview .desktop-mode-dock,
140 .desktop-mode-shell--overview #desktop-mode-side-dock {
141 width: 0 !important;
142 min-width: 0 !important;
143 padding-inline: 0 !important;
144 padding-block: 0 !important;
145 transform: translateX( -16px );
146 opacity: 0;
147 overflow: hidden;
148 pointer-events: none;
149 transition:
150 width 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
151 min-width 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
152 padding 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
153 transform 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ),
154 opacity 0.22s ease;
155 }
156
157 @media ( prefers-reduced-motion: reduce ) {
158 .desktop-mode-dock {
159 transition-duration: 0.01ms;
160 }
161 }
162
163 /* ---------------------------------------------------------------
164 * Overview thumbnail labels.
165 *
166 * Sit outside each window's transform (as absolute-positioned
167 * siblings in the desktop area) so they stay readable at any
168 * thumbnail scale — an icon-sized thumbnail still has its
169 * full-size caption hovering above it.
170 *
171 * Layout: one line, icon + title (+ optional meta). Horizontal
172 * center-of-thumbnail alignment is handled via the label's
173 * own flex + width set in JS to match the scaled thumbnail.
174 * --------------------------------------------------------------- */
175 .desktop-mode-overview-label {
176 position: absolute;
177 height: 28px;
178 display: flex;
179 align-items: center;
180 justify-content: center;
181 gap: 6px;
182 padding: 0 10px;
183 color: var( --wpd-fg-on-accent, #fff );
184 font-size: 13px;
185 font-weight: 500;
186 line-height: 1;
187 letter-spacing: 0.01em;
188 text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.55 );
189 white-space: nowrap;
190 pointer-events: none;
191 opacity: 0;
192 transform: translateY( 4px );
193 transition:
194 opacity 0.22s ease 0.06s,
195 transform 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ) 0.06s;
196 z-index: 2;
197 }
198
199 /*
200 * Active labels fade/slide in once the area enters overview mode.
201 * The short delay on `transition-*` lets the thumbnails start
202 * moving first, so labels appear to "catch up" rather than race
203 * ahead of their windows.
204 */
205 .desktop-mode-area--overview .desktop-mode-overview-label {
206 opacity: 1;
207 transform: translateY( 0 );
208 }
209
210 /* On exit, flip the animation off. */
211 .desktop-mode-overview-label--out {
212 opacity: 0 !important;
213 transform: translateY( -4px ) !important;
214 transition-delay: 0s !important;
215 }
216
217 .desktop-mode-overview-label__icon {
218 font-size: 16px;
219 width: 16px;
220 height: 16px;
221 line-height: 1;
222 flex-shrink: 0;
223 opacity: 0.9;
224 }
225
226 .desktop-mode-overview-label__title {
227 overflow: hidden;
228 text-overflow: ellipsis;
229 }
230
231 .desktop-mode-overview-label__meta {
232 color: rgba( 255, 255, 255, 0.7 );
233 font-weight: 400;
234 flex-shrink: 0;
235 }
236
237 /*
238 * Dim labels when another window is hovered. DOM order places
239 * each label immediately after its window, so the adjacent-
240 * sibling selector picks out exactly the label belonging to the
241 * hovered window and keeps it bright; all other labels fall under
242 * the `:has()` rule and dim.
243 */
244 .desktop-mode-area--overview:has( .desktop-mode-window--overview:hover )
245 .desktop-mode-overview-label {
246 opacity: 0.45;
247 transform: translateY( 0 );
248 }
249
250 .desktop-mode-window--overview:hover + .desktop-mode-overview-label {
251 opacity: 1 !important;
252 }
253
254 @media ( prefers-reduced-motion: reduce ) {
255 .desktop-mode-overview-label {
256 transition-duration: 0.01ms;
257 transition-delay: 0s;
258 }
259 }
260
261 /*
262 * Focused-window label overlay is not strictly needed — the title
263 * bar stays visible in the scaled thumbnail. If we later want a
264 * cleaner label (to combat tiny text on 8+-window grids), slot it
265 * in here via a ::after pseudo-element.
266 */
267
268 @media ( prefers-reduced-motion: reduce ) {
269 .desktop-mode-area--overview,
270 .desktop-mode-window--overview {
271 transition-duration: 0.01ms;
272 }
273 }
274
275 /* ---------------------------------------------------------------
276 * Overview top bar — virtual desktops ("Spaces") strip.
277 *
278 * Lives at the top of the desktop area while overview is active,
279 * stacked above the dimmed backdrop and below the window
280 * thumbnails. Each tile represents one desktop; clicking switches
281 * to it (and exits overview), the trailing "+" tile creates a new
282 * one, and per-tile X buttons close.
283 * --------------------------------------------------------------- */
284
285 .desktop-mode-overview-top-bar {
286 position: absolute;
287 top: 16px;
288 left: 50%;
289 transform: translateX( -50% );
290 z-index: 2;
291 opacity: 0;
292 pointer-events: none;
293 transition:
294 opacity 0.22s ease 0.06s,
295 transform 0.28s cubic-bezier( 0.2, 0, 0.2, 1 ) 0.06s;
296 }
297
298 .desktop-mode-area--overview .desktop-mode-overview-top-bar {
299 opacity: 1;
300 pointer-events: auto;
301 }
302
303 .desktop-mode-overview-top-bar--out {
304 opacity: 0 !important;
305 transform: translateX( -50% ) translateY( -6px ) !important;
306 transition-delay: 0s !important;
307 }
308
309 .desktop-mode-overview-top-bar__list {
310 display: flex;
311 flex-direction: row;
312 align-items: stretch;
313 gap: 12px;
314 padding: 8px 12px;
315 border-radius: 14px;
316 background-color: var( --wpd-scrim, rgba( 0, 0, 0, 0.32 ) );
317 backdrop-filter: blur( 18px ) saturate( 140% );
318 -webkit-backdrop-filter: blur( 18px ) saturate( 140% );
319 box-shadow:
320 0 8px 28px rgba( 0, 0, 0, 0.35 ),
321 inset 0 0 0 1px rgba( 255, 255, 255, 0.08 );
322 }
323
324 .desktop-mode-overview-top-bar__tile {
325 position: relative;
326 display: flex;
327 flex-direction: column;
328 align-items: stretch;
329 justify-content: stretch;
330 width: 140px;
331 padding: 0;
332 margin: 0;
333 background: rgba( 255, 255, 255, 0.04 );
334 border: 2px solid rgba( 255, 255, 255, 0.18 );
335 border-radius: 10px;
336 color: var( --wpd-fg-on-accent, #fff );
337 cursor: pointer;
338 overflow: hidden;
339 transition:
340 border-color 0.18s ease,
341 background-color 0.18s ease,
342 transform 0.18s ease;
343 font: inherit;
344 }
345
346 .desktop-mode-overview-top-bar__tile:hover {
347 border-color: rgba( 255, 255, 255, 0.4 );
348 background: rgba( 255, 255, 255, 0.08 );
349 }
350
351 .desktop-mode-overview-top-bar__tile:focus-visible {
352 outline: 2px solid var( --wp-admin-theme-color, #2271b1 );
353 outline-offset: 2px;
354 }
355
356 .desktop-mode-overview-top-bar__tile--active {
357 border-color: var( --wp-admin-theme-color, #2271b1 );
358 box-shadow: 0 0 0 1px var( --wp-admin-theme-color, #2271b1 );
359 }
360
361 .desktop-mode-overview-top-bar__tile-preview {
362 display: flex;
363 align-items: center;
364 justify-content: center;
365 height: 60px;
366 background: linear-gradient(
367 135deg,
368 rgba( 255, 255, 255, 0.04 ),
369 rgba( 255, 255, 255, 0.12 )
370 );
371 border-bottom: 1px solid rgba( 255, 255, 255, 0.08 );
372 }
373
374 .desktop-mode-overview-top-bar__tile-count {
375 font-size: 18px;
376 font-weight: 600;
377 color: rgba( 255, 255, 255, 0.7 );
378 letter-spacing: 0.02em;
379 }
380
381 .desktop-mode-overview-top-bar__tile-label {
382 display: block;
383 padding: 6px 10px 8px;
384 text-align: center;
385 font-size: 12px;
386 font-weight: 500;
387 color: rgba( 255, 255, 255, 0.85 );
388 white-space: nowrap;
389 overflow: hidden;
390 text-overflow: ellipsis;
391 }
392
393 .desktop-mode-overview-top-bar__tile-wrapper {
394 position: relative;
395 display: inline-block;
396 }
397
398 .desktop-mode-overview-top-bar__tile-close {
399 position: absolute;
400 top: 4px;
401 inset-inline-end: 4px;
402 width: 18px;
403 height: 18px;
404 display: flex;
405 align-items: center;
406 justify-content: center;
407 color: rgba( 255, 255, 255, 0.7 );
408 background: var( --wpd-scrim, rgba( 0, 0, 0, 0.45 ) );
409 border-radius: 50%;
410 cursor: pointer;
411 opacity: 0;
412 transition:
413 opacity 0.15s ease,
414 background-color 0.15s ease,
415 color 0.15s ease;
416 border: none;
417 padding: 0;
418 }
419
420 .desktop-mode-overview-top-bar__tile-wrapper:hover
421 .desktop-mode-overview-top-bar__tile-close,
422 .desktop-mode-overview-top-bar__tile-wrapper:focus-within
423 .desktop-mode-overview-top-bar__tile-close,
424 .desktop-mode-overview-top-bar__tile-close:focus-visible {
425 opacity: 1;
426 }
427
428 .desktop-mode-overview-top-bar__tile-close:hover {
429 background: var( --wpd-danger, #d63638 );
430 color: var( --wpd-fg-on-accent, #fff );
431 }
432
433 /*
434 * Hide the close X when there's only one tile left — the tile
435 * list contains both desktop wrappers AND the trailing "+".
436 * So "only one desktop" means exactly one wrapper in the list.
437 */
438 .desktop-mode-overview-top-bar__list:has(
439 .desktop-mode-overview-top-bar__tile-wrapper:only-of-type
440 )
441 .desktop-mode-overview-top-bar__tile-close {
442 display: none;
443 }
444
445 .desktop-mode-overview-top-bar__tile--add {
446 width: 60px;
447 background: transparent;
448 border-style: dashed;
449 }
450
451 .desktop-mode-overview-top-bar__tile--add:hover {
452 background: rgba( 255, 255, 255, 0.08 );
453 }
454
455 /*
456 * Keyboard cursor parked on the "+" tile. Mirrors the visual weight
457 * of `--active` (solid accent border + halo) so the user sees at a
458 * glance "Enter will land here". The dashed border on the add tile
459 * flips to solid when the cursor lands, matching the desktop tiles'
460 * solid borders.
461 */
462 .desktop-mode-overview-top-bar__tile--add.desktop-mode-overview-top-bar__tile--cursor {
463 border-style: solid;
464 border-color: var( --wp-admin-theme-color, #2271b1 );
465 box-shadow: 0 0 0 1px var( --wp-admin-theme-color, #2271b1 );
466 background: rgba( 255, 255, 255, 0.08 );
467 }
468
469 .desktop-mode-overview-top-bar__tile-plus {
470 display: flex;
471 align-items: center;
472 justify-content: center;
473 flex: 1;
474 font-size: 28px;
475 font-weight: 200;
476 color: rgba( 255, 255, 255, 0.7 );
477 line-height: 1;
478 }
479
480 @media ( prefers-reduced-motion: reduce ) {
481 .desktop-mode-overview-top-bar {
482 transition-duration: 0.01ms;
483 }
484 }
485