| 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 |
@import url( "effects.css" ); |
| 35 |
|
| 36 |
/* |
| 37 |
* Cross-window drag drop highlight — kept INLINE in this file |
| 38 |
* (not in any of the @import'd sub-sheets) so the mtime-stamped |
| 39 |
* `?ver=…` on `windows.css` reliably invalidates the rules along |
| 40 |
* with the parent stylesheet. Sub-sheets are fetched without an |
| 41 |
* explicit version query and can be served from the browser's |
| 42 |
* heuristic cache even after a hard reload. |
| 43 |
* |
| 44 |
* The cross-window pointer routing itself is driven from |
| 45 |
* JavaScript by `src/drag/iframe-drop-targets.ts` — on drag |
| 46 |
* START with a shortcut payload, every iframe element gets an |
| 47 |
* inline `style.pointerEvents = 'none'` so pointer events fall |
| 48 |
* through to the iframe's parent (`.desktop-mode-window__body`), |
| 49 |
* which is registered as the drop target. No CSS rule is needed |
| 50 |
* to make the routing work — this stylesheet only paints the |
| 51 |
* visual feedback for whichever window is currently the active |
| 52 |
* drop target. |
| 53 |
*/ |
| 54 |
.desktop-mode-window__body[data-desktop-mode-iframe-drop-active] { |
| 55 |
outline: 2px dashed var(--desktop-mode-accent, #2271b1); |
| 56 |
outline-offset: -6px; |
| 57 |
background: color-mix(in srgb, var(--desktop-mode-accent, #2271b1) 8%, transparent); |
| 58 |
} |
| 59 |
|
| 60 |
/* |
| 61 |
* Title-bar meta-button dashicon centring — same cache-busting |
| 62 |
* reason: Dashicons inherits `display: inline-block` from core |
| 63 |
* which positions the glyph via text-layout, and the font's |
| 64 |
* baseline isn't the geometric centre of its em-box, so the |
| 65 |
* visible `?` drifts off-centre inside the 28×28 button. |
| 66 |
* Re-flexing the dashicon span re-anchors the glyph regardless |
| 67 |
* of the font's intrinsic metrics. Lives in `windows.css` |
| 68 |
* rather than `window-chrome.css` so the parent stylesheet's |
| 69 |
* mtime stamp invalidates it on every edit — sub-sheet @imports |
| 70 |
* are not version-queried and can be served from cache. |
| 71 |
*/ |
| 72 |
.desktop-mode-window__meta-btn .dashicons { |
| 73 |
display: inline-flex; |
| 74 |
align-items: center; |
| 75 |
justify-content: center; |
| 76 |
line-height: 1; |
| 77 |
/* Reset any inherited `top` / `left` offset that bleeds in |
| 78 |
* from wp-admin or third-party stylesheets that style icons |
| 79 |
* by their glyph class (e.g. `.dashicons-editor-help` with |
| 80 |
* `top: 5px; left: 6px;` — leftover from contextual-help |
| 81 |
* styling that doesn't belong in our title bar). Without this |
| 82 |
* the glyph drifts off-centre inside the button. */ |
| 83 |
top: 0 !important; |
| 84 |
left: 0 !important; |
| 85 |
} |
| 86 |
|