PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 0.8.8
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v0.8.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 / windows.css

windows.css in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 0.8.8, at assets/css/windows.css

85 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Desktop Mode — Window styles (entry point).
3 *
4 * The window stylesheet used to be 1,500 lines of chrome, states,
5 * overview, and OS Settings mixed together. It now imports four
6 * focused files so each concern lives on its own:
7 *
8 * - window-chrome.css — base window, title bar, icon, title,
9 * controls, focused/unfocused variants,
10 * menu panel, screen-meta buttons, tabs,
11 * window body, primary iframe, native body.
12 * - window-states.css — resize handle, drag/resize overlays,
13 * maximized, fullscreen, opening animation,
14 * minimized, closing, reduced-motion, RTL.
15 * - window-overview.css — zoom-out overview grid + floating labels
16 * + per-desktop top bar + dock-collapse.
17 * - os-settings.css — the OS Settings native panel (wallpaper
18 * picker, accent, dock size, uploader,
19 * Media Library grid). Will move to its own
20 * enqueue once it stops being coupled to the
21 * window chrome loading order.
22 *
23 * The `desktop-mode-windows` script handle registers this file as its
24 * CSS source, so all four sub-sheets ship with a single handle — no
25 * changes required to `includes/assets.php` or `includes/render.php`.
26 *
27 * @since 6.9.0
28 */
29
30 @import url( "window-chrome.css" );
31 @import url( "window-states.css" );
32 @import url( "window-overview.css" );
33 @import url( "os-settings.css" );
34
35 /*
36 * Cross-window drag drop highlight — kept INLINE in this file
37 * (not in any of the @import'd sub-sheets) so the mtime-stamped
38 * `?ver=…` on `windows.css` reliably invalidates the rules along
39 * with the parent stylesheet. Sub-sheets are fetched without an
40 * explicit version query and can be served from the browser's
41 * heuristic cache even after a hard reload.
42 *
43 * The cross-window pointer routing itself is driven from
44 * JavaScript by `src/drag/iframe-drop-targets.ts` — on drag
45 * START with a shortcut payload, every iframe element gets an
46 * inline `style.pointerEvents = 'none'` so pointer events fall
47 * through to the iframe's parent (`.desktop-mode-window__body`),
48 * which is registered as the drop target. No CSS rule is needed
49 * to make the routing work — this stylesheet only paints the
50 * visual feedback for whichever window is currently the active
51 * drop target.
52 */
53 .desktop-mode-window__body[data-desktop-mode-iframe-drop-active] {
54 outline: 2px dashed var(--desktop-mode-accent, #2271b1);
55 outline-offset: -6px;
56 background: color-mix(in srgb, var(--desktop-mode-accent, #2271b1) 8%, transparent);
57 }
58
59 /*
60 * Title-bar meta-button dashicon centring — same cache-busting
61 * reason: Dashicons inherits `display: inline-block` from core
62 * which positions the glyph via text-layout, and the font's
63 * baseline isn't the geometric centre of its em-box, so the
64 * visible `?` drifts off-centre inside the 28×28 button.
65 * Re-flexing the dashicon span re-anchors the glyph regardless
66 * of the font's intrinsic metrics. Lives in `windows.css`
67 * rather than `window-chrome.css` so the parent stylesheet's
68 * mtime stamp invalidates it on every edit — sub-sheet @imports
69 * are not version-queried and can be served from cache.
70 */
71 .desktop-mode-window__meta-btn .dashicons {
72 display: inline-flex;
73 align-items: center;
74 justify-content: center;
75 line-height: 1;
76 /* Reset any inherited `top` / `left` offset that bleeds in
77 * from wp-admin or third-party stylesheets that style icons
78 * by their glyph class (e.g. `.dashicons-editor-help` with
79 * `top: 5px; left: 6px;` — leftover from contextual-help
80 * styling that doesn't belong in our title bar). Without this
81 * the glyph drifts off-centre inside the button. */
82 top: 0 !important;
83 left: 0 !important;
84 }
85