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

88 lines 3.9 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 * Two former sub-sheets moved to their own DEFERRED handles (media-
16 * print-onload swap via `desktop_mode_deferred_styles`) because the
17 * UI they style is lazy-loaded JS that can't appear at first paint:
18 *
19 * - window-overview.css — zoom-out overview grid + floating labels
20 * + per-desktop top bar + dock-collapse.
21 * Handle: `desktop-mode-window-overview`.
22 * - os-settings.css — the OS Settings native panel (wallpaper
23 * picker, accent, dock size, uploader,
24 * Media Library grid).
25 * Handle: `desktop-mode-os-settings`.
26 *
27 * The `desktop-mode-windows` style handle registers this file as its
28 * CSS source, so the remaining sub-sheets ship with a single handle.
29 *
30 * @since 6.9.0
31 */
32
33 @import url( "window-chrome.css" );
34 @import url( "window-states.css" );
35 @import url( "effects.css" );
36 @import url( "window-links.css" );
37
38 /*
39 * Cross-window drag drop highlight — kept INLINE in this file
40 * (not in any of the @import'd sub-sheets) so the mtime-stamped
41 * `?ver=…` on `windows.css` reliably invalidates the rules along
42 * with the parent stylesheet. Sub-sheets are fetched without an
43 * explicit version query and can be served from the browser's
44 * heuristic cache even after a hard reload.
45 *
46 * The cross-window pointer routing itself is driven from
47 * JavaScript by `src/drag/iframe-drop-targets.ts` — on drag
48 * START with a shortcut payload, every iframe element gets an
49 * inline `style.pointerEvents = 'none'` so pointer events fall
50 * through to the iframe's parent (`.desktop-mode-window__body`),
51 * which is registered as the drop target. No CSS rule is needed
52 * to make the routing work — this stylesheet only paints the
53 * visual feedback for whichever window is currently the active
54 * drop target.
55 */
56 .desktop-mode-window__body[data-desktop-mode-iframe-drop-active] {
57 outline: 2px dashed var(--desktop-mode-accent, #2271b1);
58 outline-offset: -6px;
59 background: color-mix(in srgb, var(--desktop-mode-accent, #2271b1) 8%, transparent);
60 }
61
62 /*
63 * Title-bar meta-button dashicon centring — same cache-busting
64 * reason: Dashicons inherits `display: inline-block` from core
65 * which positions the glyph via text-layout, and the font's
66 * baseline isn't the geometric centre of its em-box, so the
67 * visible `?` drifts off-centre inside the 28×28 button.
68 * Re-flexing the dashicon span re-anchors the glyph regardless
69 * of the font's intrinsic metrics. Lives in `windows.css`
70 * rather than `window-chrome.css` so the parent stylesheet's
71 * mtime stamp invalidates it on every edit — sub-sheet @imports
72 * are not version-queried and can be served from cache.
73 */
74 .desktop-mode-window__meta-btn .dashicons {
75 display: inline-flex;
76 align-items: center;
77 justify-content: center;
78 line-height: 1;
79 /* Reset any inherited `top` / `left` offset that bleeds in
80 * from wp-admin or third-party stylesheets that style icons
81 * by their glyph class (e.g. `.dashicons-editor-help` with
82 * `top: 5px; left: 6px;` — leftover from contextual-help
83 * styling that doesn't belong in our title bar). Without this
84 * the glyph drifts off-centre inside the button. */
85 top: 0 !important;
86 left: 0 !important;
87 }
88