| 1 |
/** |
| 2 |
* Desktop Mode — CSS Custom Properties. |
| 3 |
* |
| 4 |
* All design tokens for the desktop shell. Per-scheme blocks below |
| 5 |
* retune the accent + titlebar colors to match the user's WordPress |
| 6 |
* admin color scheme — the shell root gets a `data-desktop-mode-scheme` |
| 7 |
* attribute in PHP so the right block wins before first paint. |
| 8 |
* |
| 9 |
* Palette source: wp-admin/css/colors/<scheme>/colors.scss in Core. |
| 10 |
* We read the `base` color as the focused title bar background (same |
| 11 |
* visual weight as the admin sidebar the user is used to) and the |
| 12 |
* `highlight` color as `--wp-admin-theme-color`, which Core publishes |
| 13 |
* as the accent — buttons, tabs, focus rings. |
| 14 |
* |
| 15 |
* @since 6.9.0 |
| 16 |
*/ |
| 17 |
|
| 18 |
:root { |
| 19 |
/* Desktop area */ |
| 20 |
--desktop-mode-bg: linear-gradient(135deg, #1d2327 0%, #2c3338 50%, #1d2327 100%); |
| 21 |
--desktop-mode-area-inset: 0; |
| 22 |
|
| 23 |
/* Window chrome */ |
| 24 |
--desktop-mode-window-bg: #fff; |
| 25 |
--desktop-mode-window-border: rgba(0, 0, 0, 0.12); |
| 26 |
--desktop-mode-window-radius: 8px; |
| 27 |
--desktop-mode-window-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15); |
| 28 |
/* |
| 29 |
* Fill of the surface a window's content is revealed from once it |
| 30 |
* finishes loading (OS Settings → Effects → "Window reveal"). |
| 31 |
* |
| 32 |
* White: the surface has to be opaque or there is nothing to reveal |
| 33 |
* FROM — the content would simply be visible the whole time and the |
| 34 |
* clip animation would paint nothing. A theme retints it with any |
| 35 |
* paint value (`var( --desktop-mode-window-bg )` to follow the |
| 36 |
* window, a brand colour, a gradient, an image), and `transparent` |
| 37 |
* is a legitimate value meaning "no covering surface" — the shell |
| 38 |
* skips the layer rather than animating something invisible. |
| 39 |
* |
| 40 |
* A reveal may override this for itself when the paint IS the |
| 41 |
* reveal; `obturator` (Camera shutter) is the one built-in that |
| 42 |
* does, because near-black blades are what make it a shutter. |
| 43 |
*/ |
| 44 |
--desktop-mode-window-reveal-surface: #fff; |
| 45 |
/* |
| 46 |
* Fill of the reveal's leading edge — the band that travels with |
| 47 |
* the clip boundary and draws each reveal's shape (six lines on |
| 48 |
* Blinds, an opening ring on Iris, a rotating spoke on Radar). |
| 49 |
* |
| 50 |
* `transparent` by default: the reveal reads as the page arriving, |
| 51 |
* and a hard graphic edge on top of that is a deliberate look |
| 52 |
* rather than the neutral one. A theme (or any stylesheet) opts in |
| 53 |
* by giving this a colour — no JS and no per-reveal configuration |
| 54 |
* needed, because the band follows whatever shape the active |
| 55 |
* reveal has. While it computes to fully transparent the shell |
| 56 |
* skips the layer altogether, so the default costs nothing. |
| 57 |
*/ |
| 58 |
--desktop-mode-window-reveal-edge: transparent; |
| 59 |
--desktop-mode-window-shadow-focused: 0 12px 48px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2); |
| 60 |
|
| 61 |
/* Title bar — focused bg/color resolve via the scheme overrides below. */ |
| 62 |
--desktop-mode-titlebar-bg: #f0f0f1; |
| 63 |
--desktop-mode-titlebar-bg-focused: var(--wp-admin-theme-color, #2271b1); |
| 64 |
--desktop-mode-titlebar-color: #50575e; |
| 65 |
--desktop-mode-titlebar-color-focused: #fff; |
| 66 |
--desktop-mode-titlebar-height: 40px; |
| 67 |
|
| 68 |
/* Admin accent. Each scheme block below retunes this; the fallback |
| 69 |
* matches the legacy hardcoded value so nothing regresses if the |
| 70 |
* root has no data-desktop-mode-scheme attribute (e.g. tests). */ |
| 71 |
--wp-admin-theme-color: #2271b1; |
| 72 |
|
| 73 |
/* Resize handle — larger hit area than visual glyph; corners |
| 74 |
are transparent until hover so they don't compete with the |
| 75 |
window's own drop shadow. */ |
| 76 |
--desktop-mode-resize-size: 20px; |
| 77 |
--desktop-mode-resize-color: rgba(0, 0, 0, 0.15); |
| 78 |
|
| 79 |
/* |
| 80 |
* ---- The `--wpd-*` UI palette ----------------------------- |
| 81 |
* |
| 82 |
* The single vocabulary for every surface, text tone, border, |
| 83 |
* and status colour inside window BODIES — the `<wpd-*>` |
| 84 |
* component kit AND the feature stylesheets both read these. |
| 85 |
* Setting one value retints everything that uses it. |
| 86 |
* |
| 87 |
* Surfaces --wpd-surface cards, panels, table rows |
| 88 |
* --wpd-surface-elevated headers, raised strips |
| 89 |
* --wpd-surface-sunken wells, recessed areas |
| 90 |
* Text --wpd-fg body text |
| 91 |
* --wpd-fg-muted secondary / metadata |
| 92 |
* --wpd-fg-faint disabled |
| 93 |
* --wpd-fg-on-accent text on a filled surface |
| 94 |
* Lines --wpd-border hairlines |
| 95 |
* --wpd-border-strong emphasized dividers |
| 96 |
* Interaction |
| 97 |
* --wpd-hover row / tile hover wash |
| 98 |
* --wpd-scrim modal + overlay backdrop |
| 99 |
* Accent --wpd-accent primary action |
| 100 |
* --wpd-accent-strong its hover / active state |
| 101 |
* Status --wpd-danger --wpd-danger-hover |
| 102 |
* --wpd-warning-fg --wpd-warning-bg --wpd-warning-border |
| 103 |
* --wpd-info-fg --wpd-info-bg |
| 104 |
* --wpd-success-fg |
| 105 |
* |
| 106 |
* ## Why none of them are declared here |
| 107 |
* |
| 108 |
* They are deliberately left UNSET. Every consuming site reads |
| 109 |
* its token as `var( --wpd-x, <the literal that was always |
| 110 |
* there> )`, so with no desktop theme active the computed value |
| 111 |
* is exactly what it was before this palette existed — the |
| 112 |
* default look cannot drift, and there is no flag day. |
| 113 |
* |
| 114 |
* Declaring defaults here would be actively wrong: the same |
| 115 |
* token legitimately carries different fallbacks at different |
| 116 |
* sites (`--wpd-border` is `#dcdcde` in the settings panel and |
| 117 |
* `rgba( 0, 0, 0, 0.08 )` inside `<wpd-table>`), tuned to each |
| 118 |
* surface. One `:root` value would flatten all of them and |
| 119 |
* silently restyle the default UI. |
| 120 |
* |
| 121 |
* A desktop theme sets whichever of these it wants in its |
| 122 |
* `theme.json` `tokens` block; the compiled stylesheet declares |
| 123 |
* them on the shell root + body, and every fallback in the tree |
| 124 |
* is overridden at once. See docs/desktop-themes.md. |
| 125 |
* |
| 126 |
* @since 0.9.7 |
| 127 |
*/ |
| 128 |
|
| 129 |
/* |
| 130 |
* ---- Desktop-theme texture family ------------------------- |
| 131 |
* |
| 132 |
* These are DELIBERATELY not declared here. Every rule that |
| 133 |
* consumes one reads it as `var( --name, <initial> )`, so an |
| 134 |
* unset variable resolves to the CSS initial value and costs |
| 135 |
* exactly nothing. Declaring them with `none` up here would be |
| 136 |
* equivalent but would imply they are part of the default |
| 137 |
* palette — they are not. They exist only while an uploaded or |
| 138 |
* code-registered desktop theme is active, and only the |
| 139 |
* compiled theme stylesheet ever sets them. |
| 140 |
* |
| 141 |
* TITLEBAR --desktop-mode-titlebar-image |
| 142 |
* --desktop-mode-titlebar-image-repeat |
| 143 |
* --desktop-mode-titlebar-image-size |
| 144 |
* TITLEBAR_FOCUSED --desktop-mode-titlebar-image-focused |
| 145 |
* (falls back to the unfocused image) |
| 146 |
* WINDOW_FRAME --desktop-mode-window-border-image-source |
| 147 |
* --desktop-mode-window-border-image-slice |
| 148 |
* --desktop-mode-window-border-image-width |
| 149 |
* --desktop-mode-window-border-image-repeat |
| 150 |
* WINDOW_CORNER_* --desktop-mode-window-corner-{ne,nw,se,sw}-image |
| 151 |
* --desktop-mode-window-corner-size (shared) |
| 152 |
* --desktop-mode-window-corner-inset (shared; |
| 153 |
* how far inside the rounded corner the |
| 154 |
* ornament sits. Defaults to the resize |
| 155 |
* handle's 3px overhang plus a share of |
| 156 |
* --desktop-mode-window-radius, because the |
| 157 |
* window clips its descendants) |
| 158 |
* WINDOW_FRAME_FOCUSED |
| 159 |
* --desktop-mode-window-border-image-focused-* |
| 160 |
* (same four sub-properties as WINDOW_FRAME) |
| 161 |
* WINDOW_BODY --desktop-mode-window-body-image |
| 162 |
* TABBAR --desktop-mode-tabs-image |
| 163 |
* TITLEBAR_CONTROLS --desktop-mode-titlebar-controls-image |
| 164 |
* TITLEBAR_BUTTON --wpd-btn-bg-image |
| 165 |
* DOCK --desktop-mode-dock-bg-image |
| 166 |
* --desktop-mode-dock-bg-image-repeat |
| 167 |
* --desktop-mode-dock-bg-image-size |
| 168 |
* DOCK_ITEM --desktop-mode-dock-item-image |
| 169 |
* DESKTOP --desktop-mode-desktop-image |
| 170 |
* --desktop-mode-desktop-image-repeat |
| 171 |
* --desktop-mode-desktop-image-size |
| 172 |
* ICON_TILE --desktop-mode-tile-image |
| 173 |
* WIDGET --desktop-mode-widget-image |
| 174 |
* MENU --wpd-menu-bg-image |
| 175 |
* DIALOG --wpd-dialog-bg-image |
| 176 |
* SCRIM --wpd-scrim-image |
| 177 |
* PANEL --wpd-panel-bg-image |
| 178 |
* TOAST --wpd-toast-bg-image |
| 179 |
* TABLE_HEADER --wpd-table-header-bg-image |
| 180 |
* BUTTON --wpd-button-bg-image |
| 181 |
* |
| 182 |
* Every `image` slot also gets `<prop>-repeat` and `<prop>-size` |
| 183 |
* companions (the corners share one `-size`, and |
| 184 |
* TITLEBAR_FOCUSED inherits TITLEBAR's). |
| 185 |
* |
| 186 |
* Consumers: window-chrome.css (titlebar, frame, body, tab bar), |
| 187 |
* window-states.css (corners), dock.css, desktop.css (wallpaper, |
| 188 |
* icons, widgets), and the `<wpd-*>` component stylesheets under |
| 189 |
* `src/ui/components/` for the last seven. |
| 190 |
* Authoring reference: docs/desktop-themes.md. |
| 191 |
* |
| 192 |
* @since 0.9.7 |
| 193 |
*/ |
| 194 |
|
| 195 |
/* |
| 196 |
* ---- Title-bar control cluster ---------------------------- |
| 197 |
* |
| 198 |
* Also undeclared, and for a load-bearing reason: the cluster and |
| 199 |
* the control faces are TRANSPARENT by default, so a themed |
| 200 |
* title-bar texture runs edge to edge underneath them and the |
| 201 |
* buttons float on the artwork. A plate behind the controls is a |
| 202 |
* choice a theme makes, not a default the framework imposes. |
| 203 |
* |
| 204 |
* Cluster --desktop-mode-titlebar-controls-bg |
| 205 |
* --desktop-mode-titlebar-controls-image (+ -repeat, |
| 206 |
* -size, -position) |
| 207 |
* --desktop-mode-titlebar-controls-radius |
| 208 |
* --desktop-mode-titlebar-controls-padding (inline) |
| 209 |
* --desktop-mode-titlebar-controls-gap |
| 210 |
* Screen-meta cluster |
| 211 |
* --desktop-mode-titlebar-meta-bg / -image / -radius |
| 212 |
* (radius falls through to the controls radius) |
| 213 |
* Each face --wpd-btn-bg resting colour |
| 214 |
* --wpd-btn-bg-image (+ -repeat, -size, -position) |
| 215 |
* --wpd-btn-radius |
| 216 |
* Dividers --desktop-mode-titlebar-divider |
| 217 |
* --desktop-mode-titlebar-divider-unfocused |
| 218 |
* |
| 219 |
* Consumers: window-chrome.css and the `<wpd-window-button>` |
| 220 |
* shadow stylesheet. |
| 221 |
* |
| 222 |
* @since 0.9.8 |
| 223 |
*/ |
| 224 |
|
| 225 |
/* |
| 226 |
* ---- Title-bar control glyphs ----------------------------- |
| 227 |
* |
| 228 |
* The colour of the buttons themselves — minimise / maximise / |
| 229 |
* close, the ⋯ menu trigger, and the screen-meta cluster — in |
| 230 |
* each of the two title-bar states. |
| 231 |
* |
| 232 |
* Focused --desktop-mode-titlebar-btn-focused-color |
| 233 |
* --desktop-mode-titlebar-btn-focused-color-hover |
| 234 |
* --desktop-mode-titlebar-btn-focused-bg-hover |
| 235 |
* --desktop-mode-titlebar-btn-focused-bg-active |
| 236 |
* --desktop-mode-titlebar-btn-focused-outline |
| 237 |
* Unfocused --desktop-mode-titlebar-btn-color |
| 238 |
* --desktop-mode-titlebar-btn-color-hover |
| 239 |
* --desktop-mode-titlebar-btn-bg-hover |
| 240 |
* --desktop-mode-titlebar-btn-bg-active |
| 241 |
* |
| 242 |
* Undeclared, like everything above: each rule reads |
| 243 |
* `var( --name, <the literal it always had> )`. |
| 244 |
* |
| 245 |
* The unfocused half additionally DERIVES from |
| 246 |
* `--desktop-mode-titlebar-color` under an active desktop theme, |
| 247 |
* so most themes never need to name it. The focused half cannot |
| 248 |
* do the same — its glyphs sit on `-bg-focused`, a fill a theme |
| 249 |
* may set to anything from near-black to a pastel, and there is |
| 250 |
* no contrast-safe function of a background colour in CSS. So it |
| 251 |
* stays explicit: white at 70% until a theme says otherwise. |
| 252 |
* |
| 253 |
* Why these need names at all: the declarations land on the |
| 254 |
* WINDOW element (`.desktop-mode-window--focused`), which outranks |
| 255 |
* a `--wpd-btn-*` set at the shell root, and those names are |
| 256 |
* shared with buttons outside the title bar. A theme had no way to |
| 257 |
* recolour a focused control without also moving sticky-note and |
| 258 |
* desk chrome. |
| 259 |
* |
| 260 |
* Consumers: window-chrome.css (control cluster, ⋯ trigger, |
| 261 |
* screen-meta buttons). |
| 262 |
*/ |
| 263 |
|
| 264 |
/* |
| 265 |
* ---- Typography ------------------------------------------ |
| 266 |
* |
| 267 |
* Also deliberately UNDECLARED, for the same reason as the |
| 268 |
* `--wpd-*` palette: every consuming rule reads |
| 269 |
* `font-family: var( --name, <the literal that was always |
| 270 |
* there> )`, so an unset token computes to exactly what it |
| 271 |
* always did. A desktop theme sets them (and may ship the |
| 272 |
* `@font-face` rules to back them) and the whole shell changes |
| 273 |
* typeface at once. |
| 274 |
* |
| 275 |
* --desktop-mode-font shell chrome: dock labels, |
| 276 |
* desktop icons, widgets |
| 277 |
* --desktop-mode-titlebar-font window title bars; falls back |
| 278 |
* to --desktop-mode-font |
| 279 |
* --wpd-font window BODIES + the `<wpd-*>` |
| 280 |
* component kit |
| 281 |
* --wpd-font-mono code, hashes, file sizes, |
| 282 |
* log output |
| 283 |
* |
| 284 |
* The split matters: a theme can put a display face on the |
| 285 |
* chrome while window content stays on a readable text face, |
| 286 |
* which is what real desktop environments do. |
| 287 |
* |
| 288 |
* Note that iframe windows render a real wp-admin document in a |
| 289 |
* separate browsing context that the theme stylesheet does not |
| 290 |
* reach — these tokens style the shell and native windows. |
| 291 |
* |
| 292 |
* @since 0.9.8 |
| 293 |
*/ |
| 294 |
|
| 295 |
/* |
| 296 |
* ---- Badges ---------------------------------------------- |
| 297 |
* |
| 298 |
* Undeclared, and DERIVED rather than fixed. Every badge sizes |
| 299 |
* itself off the icon it decorates — the dock badge off |
| 300 |
* `--desktop-mode-dock-icon-size`, the wallpaper badges off |
| 301 |
* `--desktop-mode-icon-image-size` — so a user who picks a large |
| 302 |
* dock, or a theme that scales its icons, doesn't end up with a |
| 303 |
* speck stuck to an oversized tile. At the default sizes the |
| 304 |
* derivations resolve to the exact values these rules used to |
| 305 |
* hardcode. |
| 306 |
* |
| 307 |
* Dock --desktop-mode-dock-badge-size (overrides the |
| 308 |
* whole derivation; font + padding follow it) |
| 309 |
* --desktop-mode-dock-badge-font-size / -padding |
| 310 |
* --desktop-mode-dock-badge-offset / -bg / -fg |
| 311 |
* --desktop-mode-dock-badge-font-weight |
| 312 |
* Desktop icon --desktop-mode-icon-badge-size / -font-size |
| 313 |
* --desktop-mode-icon-badge-padding / -bg / -fg |
| 314 |
* Recycle bin --desktop-mode-recycle-badge-size / -font-size |
| 315 |
* / -bg / -fg. Falls through to the generic |
| 316 |
* icon-badge token, so "badges are 22px" reaches |
| 317 |
* the bin too. |
| 318 |
* |
| 319 |
* @since 0.9.8 |
| 320 |
*/ |
| 321 |
|
| 322 |
/* |
| 323 |
* ---- Tooltips --------------------------------------------- |
| 324 |
* |
| 325 |
* Undeclared, like the palette above — every tooltip reads |
| 326 |
* `var( --desktop-mode-tooltip-bg, <the chain it always had> )`, |
| 327 |
* so an unthemed shell renders exactly as before. |
| 328 |
* |
| 329 |
* --desktop-mode-tooltip-bg the chip / card surface |
| 330 |
* --desktop-mode-tooltip-fg its primary text |
| 331 |
* |
| 332 |
* They exist because tooltips used to borrow their two colours |
| 333 |
* from unrelated families — `--wpd-scrim` (an overlay BACKDROP) |
| 334 |
* or `--wpd-surface-elevated` for the surface, `--wpd-fg-on-accent` |
| 335 |
* for the text. Those pairings hold for the default look and come |
| 336 |
* apart under a custom theme: a theme that sets `--wpd-scrim` to a |
| 337 |
* translucent wash for its modals turns every tooltip translucent |
| 338 |
* with it, and a light theme that sets `--wpd-surface-elevated` |
| 339 |
* light while `--wpd-fg-on-accent` stays white renders white text |
| 340 |
* on a white tooltip. A theme could not fix either without |
| 341 |
* breaking the modal backdrop or the text on its accent buttons, |
| 342 |
* because it had no name for "tooltip" to aim at. Now it does. |
| 343 |
* |
| 344 |
* Consumers: dock.css (dock tile tooltip), content-graph.css |
| 345 |
* (satellite tooltip), my-wordpress.css (entity hover card). |
| 346 |
* |
| 347 |
* Secondary text inside the richer tooltips — the hover card's |
| 348 |
* excerpt — still follows `--wpd-fg-muted`; these two tokens |
| 349 |
* cover the surface and the primary text on it. |
| 350 |
*/ |
| 351 |
|
| 352 |
/* |
| 353 |
* ---- Dock glyphs ------------------------------------------ |
| 354 |
* |
| 355 |
* `--desktop-mode-dock-bg` below is declared, so a theme can and |
| 356 |
* does repaint the strip. What it paints ON the strip was, until |
| 357 |
* these tokens, fixed white — the glyph, its hover brightening, |
| 358 |
* the hover wash behind the tile, and the focus ring. Set the |
| 359 |
* dock to anything pale and every tile went blank. |
| 360 |
* |
| 361 |
* --desktop-mode-dock-icon-color glyph at rest |
| 362 |
* --desktop-mode-dock-icon-color-hover glyph on hover / peek |
| 363 |
* --desktop-mode-dock-item-bg-hover wash behind the tile |
| 364 |
* --desktop-mode-dock-item-outline keyboard focus ring |
| 365 |
* |
| 366 |
* Undeclared, like the palette: each site reads |
| 367 |
* `var( --name, <the literal it always had> )`. System tiles |
| 368 |
* (OS Settings, recycle bin, …) read the same `-icon-color` with |
| 369 |
* their own slightly brighter literal behind it, so unthemed they |
| 370 |
* keep their notch of extra prominence and themed they follow the |
| 371 |
* single colour the theme named. |
| 372 |
* |
| 373 |
* Named a *colour*, not a fill, on purpose: every image glyph in |
| 374 |
* the dock is painted as a mask filled with this colour — a |
| 375 |
* theme's own iconset via `"iconColor": "currentColor"`, and |
| 376 |
* plugin / CPT artwork via `currentColor` on the tile. So one |
| 377 |
* token drives dashicons, theme art, plugin art, and the hover |
| 378 |
* transition between them. The `__item-svg` fallback (a URL the |
| 379 |
* mask can't take) still force-whitens; see the note in dock.css. |
| 380 |
* |
| 381 |
* Consumers: dock.css, dock-peek.css (which re-states the hover |
| 382 |
* rule and so must read the same two tokens). |
| 383 |
*/ |
| 384 |
|
| 385 |
/* Dock */ |
| 386 |
--desktop-mode-dock-width: 56px; |
| 387 |
--desktop-mode-dock-icon-size: 20px; |
| 388 |
--desktop-mode-dock-bg: rgba(0, 0, 0, 0.4); |
| 389 |
/* |
| 390 |
* Hairline between the dock and the desktop. Reaches the side |
| 391 |
* placements (as a single inline-edge border) AND the floating |
| 392 |
* bottom pill (as its full outline). Set `transparent` for a |
| 393 |
* borderless dock. |
| 394 |
* |
| 395 |
* The bottom pill's own chrome is separately overridable, because |
| 396 |
* it is deliberately a different piece of glass — a warmer tint, a |
| 397 |
* brighter top edge, an inset highlight, a drop shadow. Each falls |
| 398 |
* back to the shared value above it: |
| 399 |
* |
| 400 |
* --desktop-mode-dock-floating-bg |
| 401 |
* --desktop-mode-dock-floating-border (→ dock-border) |
| 402 |
* --desktop-mode-dock-floating-border-top (→ floating-border) |
| 403 |
* --desktop-mode-dock-floating-highlight |
| 404 |
* --desktop-mode-dock-floating-shadow |
| 405 |
* |
| 406 |
* @since 0.9.8 the floating pill honours these at all; it used to |
| 407 |
* hardcode every one of them. |
| 408 |
*/ |
| 409 |
--desktop-mode-dock-border: rgba(255, 255, 255, 0.08); |
| 410 |
|
| 411 |
/* |
| 412 |
* File tiles — anywhere a `.desktop-mode-file-tile` (or sibling |
| 413 |
* canvas tile) renders. The defaults below match the wallpaper |
| 414 |
* (dark gradient → white text + soft white hover). Light-on-dark |
| 415 |
* surfaces override these in their own scope, e.g.: |
| 416 |
* |
| 417 |
* .desktop-mode-folder-window { |
| 418 |
* --desktop-mode-tile-fg: #1d2327; |
| 419 |
* --desktop-mode-tile-hover-bg: rgba(0, 0, 0, 0.06); |
| 420 |
* } |
| 421 |
* |
| 422 |
* Plugin authors can override any of these in their own theme |
| 423 |
* to retint tiles globally without touching the rules below. |
| 424 |
* |
| 425 |
* @since 0.8.0 |
| 426 |
*/ |
| 427 |
--desktop-mode-tile-fg: var(--desktop-mode-fg, #fff); |
| 428 |
--desktop-mode-tile-fg-muted: rgba(255, 255, 255, 0.7); |
| 429 |
--desktop-mode-tile-hover-bg: rgba(255, 255, 255, 0.12); |
| 430 |
--desktop-mode-tile-focus-ring: var(--wp-admin-theme-color, #2271b1); |
| 431 |
--desktop-mode-tile-shortcut-bg: rgba(0, 0, 0, 0.65); |
| 432 |
--desktop-mode-tile-shortcut-fg: #fff; |
| 433 |
--desktop-mode-tile-shortcut-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); |
| 434 |
|
| 435 |
/* |
| 436 |
* Label rendering tokens. Defaults match the dark wallpaper: |
| 437 |
* a soft drop-shadow boosts legibility against the gradient, |
| 438 |
* regular weight, default antialiasing. |
| 439 |
* |
| 440 |
* Light-context surfaces (folder windows, My WordPress, any |
| 441 |
* future window with a light body) rebind these in their own |
| 442 |
* scope so tile labels render with the same crispness as the |
| 443 |
* surrounding chrome — no per-surface duplicate rules. |
| 444 |
* |
| 445 |
* @since 0.8.0 |
| 446 |
*/ |
| 447 |
--desktop-mode-tile-label-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); |
| 448 |
--desktop-mode-tile-label-weight: 400; |
| 449 |
--desktop-mode-tile-label-smoothing: auto; |
| 450 |
--desktop-mode-tile-label-color: var(--desktop-mode-tile-fg); |
| 451 |
|
| 452 |
/* |
| 453 |
* Admin bar — how many pixels of the bar stay on screen while it |
| 454 |
* is parked off the top edge in `dynamic` mode. This is the |
| 455 |
* VISIBLE seam only: small enough to read as "nothing is there". |
| 456 |
* Themes may retune it; `0` makes the bar invisible until hovered. |
| 457 |
*/ |
| 458 |
--desktop-mode-admin-bar-peek: 4px; |
| 459 |
|
| 460 |
/* |
| 461 |
* How far BELOW the parked bar the invisible reveal zone reaches. |
| 462 |
* Decoupled from the peek on purpose — the seam wants to be a |
| 463 |
* hairline, the pointer target wants to be forgiving, and tying |
| 464 |
* them together forces one of the two to be wrong. The band the |
| 465 |
* user actually has to hit is `peek + this`. |
| 466 |
* |
| 467 |
* CEILING: keep `peek + reveal-zone` comfortably under the admin |
| 468 |
* bar's own height (32px, 46px below 783px). Past that, leaving |
| 469 |
* the revealed bar drops the pointer straight back into the zone, |
| 470 |
* which re-reveals it — an oscillation loop, not a wider target. |
| 471 |
*/ |
| 472 |
--desktop-mode-admin-bar-reveal-zone: 16px; |
| 473 |
|
| 474 |
/* Z-index layers */ |
| 475 |
--desktop-mode-z-base: 100; |
| 476 |
--desktop-mode-z-dock: 200; |
| 477 |
--desktop-mode-z-adminbar: 9991; |
| 478 |
--desktop-mode-z-fullscreen: 99999; |
| 479 |
/* Window-link layer — above widgets (z 1), behind windows (z 100+). */ |
| 480 |
--desktop-mode-z-window-links: 50; |
| 481 |
|
| 482 |
/* |
| 483 |
* Window-link ties (relation splines between windows). The accent |
| 484 |
* follows the admin color scheme. Solid colors only — the resting |
| 485 |
* dimming is done with stroke-opacity/fill-opacity in |
| 486 |
* window-links.css, NOT color-mix(): an unresolvable color-mix() |
| 487 |
* inside a custom property makes the consuming declaration invalid |
| 488 |
* at computed-value time, which turns SVG strokes invisible and |
| 489 |
* marker fills black (the written rgba() fallback declaration is |
| 490 |
* already gone from the cascade by then). Overridable per scheme |
| 491 |
* or by plugins/themes without touching the renderer. |
| 492 |
* |
| 493 |
* @since 0.9.4 |
| 494 |
*/ |
| 495 |
--desktop-mode-window-link-color: var(--wp-admin-theme-color, #2271b1); |
| 496 |
--desktop-mode-window-link-color-active: var(--wp-admin-theme-color, #2271b1); |
| 497 |
--desktop-mode-window-link-width: 1.5px; |
| 498 |
--desktop-mode-window-link-accent: var(--wp-admin-theme-color, #2271b1); |
| 499 |
/* |
| 500 |
* Halo behind related windows (`.desktop-mode-window--linked`). |
| 501 |
* A literal rgba of the default admin blue rather than a |
| 502 |
* color-mix() of the accent — same no-color-mix rationale as |
| 503 |
* above: if this token failed to resolve, the whole box-shadow |
| 504 |
* declaration (elevation shadow included) would go invalid. |
| 505 |
* Schemes/plugins that retint the accent should override this too. |
| 506 |
*/ |
| 507 |
--desktop-mode-window-link-glow: rgba(34, 113, 177, 0.45); |
| 508 |
} |
| 509 |
|
| 510 |
/* |
| 511 |
* Per-scheme overrides. Scoped to `.desktop-mode-shell[data-desktop-mode-scheme]` |
| 512 |
* so the variables only affect the shell subtree — we don't want to touch |
| 513 |
* Gutenberg or other nested contexts that also read `--wp-admin-theme-color`. |
| 514 |
* |
| 515 |
* Setting the vars on the shell root means any descendant (title bar, |
| 516 |
* dock chip, tab underlines, focus rings) that references them inherits |
| 517 |
* the right hue without further plumbing. |
| 518 |
* |
| 519 |
* Title bar bg deliberately differs from the WP admin bar (which uses |
| 520 |
* each scheme's "base" color) — when the two sit edge-to-edge the |
| 521 |
* shared hue reads as one slab. We mix base with white (dark schemes) |
| 522 |
* or black (light schemes) ~15–20% so the titlebar feels related but |
| 523 |
* clearly distinct. |
| 524 |
*/ |
| 525 |
|
| 526 |
/* |
| 527 |
* The focused titlebar colors below are the pre-computed sRGB result |
| 528 |
* of each scheme's base color mixed with white (dark schemes) or |
| 529 |
* black (light schemes). We used to write these as |
| 530 |
* `color-mix(in srgb, …)` calls, but `color-mix()` only shipped in |
| 531 |
* Chrome 111 — on older Chromium-based browsers the whole declaration |
| 532 |
* is invalid-at-computed-value-time and the titlebar falls back to |
| 533 |
* the unfocused light surface, which hides the white control glyphs. |
| 534 |
* Since the mix inputs are all static there is no behavioral loss |
| 535 |
* from inlining the resulting hex value. |
| 536 |
*/ |
| 537 |
|
| 538 |
/* Fresh — default WP blue. */ |
| 539 |
.desktop-mode-shell[data-desktop-mode-scheme="fresh"] { |
| 540 |
--wp-admin-theme-color: #2271b1; |
| 541 |
/* color-mix(in srgb, #1d2327 80%, #fff 20%) */ |
| 542 |
--desktop-mode-titlebar-bg-focused: #4a4f52; |
| 543 |
--desktop-mode-titlebar-color-focused: #fff; |
| 544 |
} |
| 545 |
|
| 546 |
/* Light — pale sidebar, teal accent. */ |
| 547 |
.desktop-mode-shell[data-desktop-mode-scheme="light"] { |
| 548 |
--wp-admin-theme-color: #04a4cc; |
| 549 |
/* color-mix(in srgb, #e5e5e5 85%, #000 15%) */ |
| 550 |
--desktop-mode-titlebar-bg-focused: #c3c3c3; |
| 551 |
--desktop-mode-titlebar-color-focused: #333; |
| 552 |
} |
| 553 |
|
| 554 |
/* Modern — vivid indigo accent, near-black sidebar. */ |
| 555 |
.desktop-mode-shell[data-desktop-mode-scheme="modern"] { |
| 556 |
--wp-admin-theme-color: #3858e9; |
| 557 |
/* color-mix(in srgb, #1e1e1e 78%, #fff 22%) */ |
| 558 |
--desktop-mode-titlebar-bg-focused: #505050; |
| 559 |
--desktop-mode-titlebar-color-focused: #f3f1f1; |
| 560 |
} |
| 561 |
|
| 562 |
/* Blue. */ |
| 563 |
.desktop-mode-shell[data-desktop-mode-scheme="blue"] { |
| 564 |
--wp-admin-theme-color: #096484; |
| 565 |
/* color-mix(in srgb, #096484 82%, #fff 18%) */ |
| 566 |
--desktop-mode-titlebar-bg-focused: #35809a; |
| 567 |
--desktop-mode-titlebar-color-focused: #e5f8ff; |
| 568 |
} |
| 569 |
|
| 570 |
/* Coffee. */ |
| 571 |
.desktop-mode-shell[data-desktop-mode-scheme="coffee"] { |
| 572 |
--wp-admin-theme-color: #c7a589; |
| 573 |
/* color-mix(in srgb, #46403c 80%, #fff 20%) */ |
| 574 |
--desktop-mode-titlebar-bg-focused: #6b6663; |
| 575 |
--desktop-mode-titlebar-color-focused: #ece6f6; |
| 576 |
} |
| 577 |
|
| 578 |
/* Ectoplasm. */ |
| 579 |
.desktop-mode-shell[data-desktop-mode-scheme="ectoplasm"] { |
| 580 |
--wp-admin-theme-color: #a3b745; |
| 581 |
/* color-mix(in srgb, #413256 80%, #fff 20%) */ |
| 582 |
--desktop-mode-titlebar-bg-focused: #675b78; |
| 583 |
--desktop-mode-titlebar-color-focused: #ece6f6; |
| 584 |
} |
| 585 |
|
| 586 |
/* Midnight. */ |
| 587 |
.desktop-mode-shell[data-desktop-mode-scheme="midnight"] { |
| 588 |
--wp-admin-theme-color: #e14d43; |
| 589 |
/* color-mix(in srgb, #25282b 80%, #fff 20%) */ |
| 590 |
--desktop-mode-titlebar-bg-focused: #515355; |
| 591 |
--desktop-mode-titlebar-color-focused: #f1f2f3; |
| 592 |
} |
| 593 |
|
| 594 |
/* Ocean. */ |
| 595 |
.desktop-mode-shell[data-desktop-mode-scheme="ocean"] { |
| 596 |
--wp-admin-theme-color: #9ebaa0; |
| 597 |
/* color-mix(in srgb, #627c83 80%, #fff 20%) */ |
| 598 |
--desktop-mode-titlebar-bg-focused: #81969c; |
| 599 |
--desktop-mode-titlebar-color-focused: #f2fcff; |
| 600 |
} |
| 601 |
|
| 602 |
/* Sunrise. */ |
| 603 |
.desktop-mode-shell[data-desktop-mode-scheme="sunrise"] { |
| 604 |
--wp-admin-theme-color: #dd823b; |
| 605 |
/* color-mix(in srgb, #b43c38 80%, #fff 20%) */ |
| 606 |
--desktop-mode-titlebar-bg-focused: #c36360; |
| 607 |
--desktop-mode-titlebar-color-focused: #f3f1f1; |
| 608 |
} |
| 609 |
|