| 1 |
/** |
| 2 |
* Desktop Mode — Dock. |
| 3 |
* |
| 4 |
* A rail that hosts admin menu tiles plus shell-level system tiles. |
| 5 |
* Placement (left / right / bottom) is reflected on each dock element |
| 6 |
* itself as `data-desktop-mode-dock-placement`; this stylesheet keys |
| 7 |
* off that attribute for layout, tooltip anchor, and indicator |
| 8 |
* position. Two instances can coexist (Classic layout: a left side |
| 9 |
* bar with core menus + a bottom dock with plugin menus); each |
| 10 |
* carries its own placement attribute, so the two rails are styled |
| 11 |
* independently without leaking selector state to one another. |
| 12 |
* |
| 13 |
* @since 6.9.0 |
| 14 |
*/ |
| 15 |
|
| 16 |
/* ------------------------------------------------------------------ |
| 17 |
* Shared dock chrome — applies to every placement. |
| 18 |
* ------------------------------------------------------------------ */ |
| 19 |
|
| 20 |
.desktop-mode-dock { |
| 21 |
display: flex; |
| 22 |
align-items: center; |
| 23 |
z-index: var( --desktop-mode-z-dock ); |
| 24 |
background: var( --desktop-mode-dock-bg ); |
| 25 |
backdrop-filter: blur( 20px ); |
| 26 |
-webkit-backdrop-filter: blur( 20px ); |
| 27 |
flex-shrink: 0; |
| 28 |
/* |
| 29 |
* overflow: visible so the per-tile "Open another" chip can float |
| 30 |
* past the dock's outer edge. Real-world menus fit the viewport |
| 31 |
* without a scrollbar; if this ever needs to scroll, wrap tiles |
| 32 |
* in a scroll container rather than clipping here. |
| 33 |
*/ |
| 34 |
overflow: visible; |
| 35 |
} |
| 36 |
|
| 37 |
/* A single dock tile — icon button (+ optional instance rail below). */ |
| 38 |
.desktop-mode-dock__item { |
| 39 |
position: relative; |
| 40 |
display: flex; |
| 41 |
flex-direction: column; |
| 42 |
align-items: center; |
| 43 |
width: 40px; |
| 44 |
flex-shrink: 0; |
| 45 |
} |
| 46 |
|
| 47 |
/* Primary icon button — opens or focuses the page. */ |
| 48 |
.desktop-mode-dock__item-primary { |
| 49 |
position: relative; |
| 50 |
display: flex; |
| 51 |
align-items: center; |
| 52 |
justify-content: center; |
| 53 |
width: 40px; |
| 54 |
height: 40px; |
| 55 |
border: none; |
| 56 |
border-radius: 10px; |
| 57 |
cursor: pointer; |
| 58 |
padding: 0; |
| 59 |
background: transparent; |
| 60 |
color: rgba( 255, 255, 255, 0.7 ); |
| 61 |
transition: background-color 0.15s ease, transform 0.15s ease, color 0.15s ease; |
| 62 |
} |
| 63 |
|
| 64 |
.desktop-mode-dock__item-primary:hover { |
| 65 |
background: rgba( 255, 255, 255, 0.15 ); |
| 66 |
color: #fff; |
| 67 |
transform: scale( 1.1 ); |
| 68 |
} |
| 69 |
|
| 70 |
.desktop-mode-dock__item-primary:active { |
| 71 |
transform: scale( 0.95 ); |
| 72 |
} |
| 73 |
|
| 74 |
.desktop-mode-dock__item-primary:focus-visible { |
| 75 |
outline: 2px solid rgba( 255, 255, 255, 0.7 ); |
| 76 |
outline-offset: 2px; |
| 77 |
} |
| 78 |
|
| 79 |
/* Dashicon inside dock item. */ |
| 80 |
.desktop-mode-dock__item .dashicons { |
| 81 |
font-size: var( --desktop-mode-dock-icon-size, 20px ); |
| 82 |
width: var( --desktop-mode-dock-icon-size, 20px ); |
| 83 |
height: var( --desktop-mode-dock-icon-size, 20px ); |
| 84 |
line-height: 1; |
| 85 |
} |
| 86 |
|
| 87 |
/* SVG icon (for custom post types with data:image/svg+xml icons). */ |
| 88 |
.desktop-mode-dock__item-svg { |
| 89 |
width: var( --desktop-mode-dock-icon-size, 20px ); |
| 90 |
height: var( --desktop-mode-dock-icon-size, 20px ); |
| 91 |
display: block; |
| 92 |
fill: currentColor; |
| 93 |
opacity: 0.7; |
| 94 |
/* Some plugin SVGs ship hardcoded `fill="..."` attributes inside |
| 95 |
the markup, which override `fill: currentColor` and make the |
| 96 |
icon keep its brand color. Force the monochrome white palette |
| 97 |
to match dashicons. */ |
| 98 |
filter: brightness(0) invert(1); |
| 99 |
transition: opacity 0.15s ease; |
| 100 |
} |
| 101 |
|
| 102 |
.desktop-mode-dock__item-primary:hover .desktop-mode-dock__item-svg { |
| 103 |
opacity: 1; |
| 104 |
} |
| 105 |
|
| 106 |
/* |
| 107 |
* Letter-badge icon — rendered for items registered without a |
| 108 |
* dashicon / SVG / image URL. Miniature "app placeholder": rounded |
| 109 |
* square tinted with a title-derived hue, first letter centered. |
| 110 |
*/ |
| 111 |
.desktop-mode-dock__item-letter { |
| 112 |
display: flex; |
| 113 |
align-items: center; |
| 114 |
justify-content: center; |
| 115 |
width: 28px; |
| 116 |
height: 28px; |
| 117 |
border-radius: 8px; |
| 118 |
color: #fff; |
| 119 |
font-size: 15px; |
| 120 |
font-weight: 700; |
| 121 |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; |
| 122 |
line-height: 1; |
| 123 |
letter-spacing: 0; |
| 124 |
text-shadow: 0 1px 1px rgba( 0, 0, 0, 0.22 ); |
| 125 |
box-shadow: |
| 126 |
inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), |
| 127 |
inset 0 -1px 0 rgba( 0, 0, 0, 0.15 ); |
| 128 |
} |
| 129 |
|
| 130 |
.desktop-mode-dock__item img.desktop-mode-dock__item-img { |
| 131 |
width: var( --desktop-mode-dock-icon-size, 20px ); |
| 132 |
height: var( --desktop-mode-dock-icon-size, 20px ); |
| 133 |
display: block; |
| 134 |
opacity: 0.7; |
| 135 |
transition: opacity 0.15s ease; |
| 136 |
} |
| 137 |
|
| 138 |
.desktop-mode-dock__item-primary:hover img.desktop-mode-dock__item-img { |
| 139 |
opacity: 1; |
| 140 |
} |
| 141 |
|
| 142 |
/* "Open another" floating chip — shown on multi-capable tiles that |
| 143 |
* already have ≥1 open instance. Positioned inside each orientation |
| 144 |
* block so the chip hugs the outward edge of the tile. */ |
| 145 |
.desktop-mode-dock__item-new { |
| 146 |
position: absolute; |
| 147 |
display: flex; |
| 148 |
align-items: center; |
| 149 |
justify-content: center; |
| 150 |
width: 20px; |
| 151 |
height: 20px; |
| 152 |
padding: 0; |
| 153 |
border: 2px solid var( --desktop-mode-dock-bg, rgba( 0, 0, 0, 0.4 ) ); |
| 154 |
border-radius: 50%; |
| 155 |
background: var( --wp-admin-theme-color, #2271b1 ); |
| 156 |
color: #fff; |
| 157 |
cursor: pointer; |
| 158 |
transition: background-color 0.15s ease, transform 0.15s ease; |
| 159 |
z-index: 1; |
| 160 |
} |
| 161 |
|
| 162 |
.desktop-mode-dock__item-new[hidden] { |
| 163 |
display: none; |
| 164 |
} |
| 165 |
|
| 166 |
.desktop-mode-dock__item-new:hover { |
| 167 |
background: #fff; |
| 168 |
color: var( --wp-admin-theme-color, #2271b1 ); |
| 169 |
} |
| 170 |
|
| 171 |
.desktop-mode-dock__item-new:focus-visible { |
| 172 |
outline: 2px solid rgba( 255, 255, 255, 0.85 ); |
| 173 |
outline-offset: 2px; |
| 174 |
} |
| 175 |
|
| 176 |
/* Notification badge — iOS/macOS-style pill straddling the tile |
| 177 |
* corner. Ring matches the dock bg so it reads as "punched out." |
| 178 |
* Badge positioning is placement-aware via the blocks below. */ |
| 179 |
.desktop-mode-dock__badge { |
| 180 |
position: absolute; |
| 181 |
min-width: 16px; |
| 182 |
height: 16px; |
| 183 |
padding: 0 5px; |
| 184 |
box-sizing: border-box; |
| 185 |
border-radius: 999px; |
| 186 |
background: linear-gradient( 180deg, #ff5a5a 0%, #d63638 100% ); |
| 187 |
color: #fff; |
| 188 |
display: inline-flex; |
| 189 |
align-items: center; |
| 190 |
justify-content: center; |
| 191 |
font-size: 10px; |
| 192 |
font-weight: 700; |
| 193 |
line-height: 1; |
| 194 |
letter-spacing: 0.01em; |
| 195 |
text-align: center; |
| 196 |
font-variant-numeric: tabular-nums; |
| 197 |
box-shadow: |
| 198 |
0 0 0 1.5px var( --desktop-mode-dock-bg, rgba( 0, 0, 0, 0.4 ) ), |
| 199 |
0 1px 3px rgba( 0, 0, 0, 0.35 ); |
| 200 |
pointer-events: none; |
| 201 |
transition: transform 0.15s ease; |
| 202 |
top: -3px; |
| 203 |
inset-inline-end: -3px; |
| 204 |
} |
| 205 |
|
| 206 |
.desktop-mode-dock__item:hover .desktop-mode-dock__badge { |
| 207 |
transform: scale( 1.05 ); |
| 208 |
top: -4px; |
| 209 |
} |
| 210 |
|
| 211 |
/* System tiles — same footprint as menu tiles, no badges, no rails. */ |
| 212 |
.desktop-mode-dock__item--system .desktop-mode-dock__item-primary { |
| 213 |
color: rgba( 255, 255, 255, 0.8 ); |
| 214 |
} |
| 215 |
|
| 216 |
/* ----------------------------------------------------------------------------- |
| 217 |
* Attention animations — driven by `Dock.setAttention()` / |
| 218 |
* `Window.requestAttention()`. The class lands on the tile root, |
| 219 |
* the animation runs on the primary icon button so the badge stays |
| 220 |
* stable. Three modes (pulse / shake / bounce) and three intensities |
| 221 |
* (subtle / normal / strong). All animations gated on |
| 222 |
* `prefers-reduced-motion: no-preference`; the reduced-motion fallback |
| 223 |
* shows a static accent ring for the same duration so the affordance |
| 224 |
* still works. |
| 225 |
* ------------------------------------------------------------------------- */ |
| 226 |
|
| 227 |
@keyframes wpd-dock-attention-pulse { |
| 228 |
0%, 100% { |
| 229 |
transform: scale( 1 ); |
| 230 |
box-shadow: 0 0 0 0 rgba( 255, 90, 90, 0.55 ); |
| 231 |
} |
| 232 |
50% { |
| 233 |
transform: scale( 1.06 ); |
| 234 |
box-shadow: 0 0 0 8px rgba( 255, 90, 90, 0 ); |
| 235 |
} |
| 236 |
} |
| 237 |
|
| 238 |
@keyframes wpd-dock-attention-shake { |
| 239 |
0%, 100% { |
| 240 |
transform: translateX( 0 ); |
| 241 |
} |
| 242 |
20%, 60% { |
| 243 |
transform: translateX( -3px ); |
| 244 |
} |
| 245 |
40%, 80% { |
| 246 |
transform: translateX( 3px ); |
| 247 |
} |
| 248 |
} |
| 249 |
|
| 250 |
@keyframes wpd-dock-attention-bounce { |
| 251 |
0%, 100% { |
| 252 |
transform: translateY( 0 ); |
| 253 |
} |
| 254 |
30% { |
| 255 |
transform: translateY( -6px ); |
| 256 |
} |
| 257 |
60% { |
| 258 |
transform: translateY( -2px ); |
| 259 |
} |
| 260 |
} |
| 261 |
|
| 262 |
.desktop-mode-dock__item--attention-pulse .desktop-mode-dock__item-primary { |
| 263 |
animation: wpd-dock-attention-pulse 1.4s ease-in-out infinite; |
| 264 |
} |
| 265 |
.desktop-mode-dock__item--attention-shake .desktop-mode-dock__item-primary { |
| 266 |
animation: wpd-dock-attention-shake 0.8s ease-in-out infinite; |
| 267 |
} |
| 268 |
.desktop-mode-dock__item--attention-bounce .desktop-mode-dock__item-primary { |
| 269 |
animation: wpd-dock-attention-bounce 1.2s ease-in-out infinite; |
| 270 |
} |
| 271 |
|
| 272 |
/* Intensity modulates animation duration — strong = faster, more |
| 273 |
urgent; subtle = slower, calmer. */ |
| 274 |
.desktop-mode-dock__item--intensity-strong.desktop-mode-dock__item--attention-pulse .desktop-mode-dock__item-primary { |
| 275 |
animation-duration: 1s; |
| 276 |
} |
| 277 |
.desktop-mode-dock__item--intensity-strong.desktop-mode-dock__item--attention-shake .desktop-mode-dock__item-primary { |
| 278 |
animation-duration: 0.6s; |
| 279 |
} |
| 280 |
.desktop-mode-dock__item--intensity-strong.desktop-mode-dock__item--attention-bounce .desktop-mode-dock__item-primary { |
| 281 |
animation-duration: 0.9s; |
| 282 |
} |
| 283 |
.desktop-mode-dock__item--intensity-subtle.desktop-mode-dock__item--attention-pulse .desktop-mode-dock__item-primary { |
| 284 |
animation-duration: 1.8s; |
| 285 |
} |
| 286 |
.desktop-mode-dock__item--intensity-subtle.desktop-mode-dock__item--attention-shake .desktop-mode-dock__item-primary { |
| 287 |
animation-duration: 1s; |
| 288 |
} |
| 289 |
.desktop-mode-dock__item--intensity-subtle.desktop-mode-dock__item--attention-bounce .desktop-mode-dock__item-primary { |
| 290 |
animation-duration: 1.6s; |
| 291 |
} |
| 292 |
|
| 293 |
/* Reduced-motion: kill the animation, replace with a static accent ring |
| 294 |
for the same visual prominence without the movement. */ |
| 295 |
@media ( prefers-reduced-motion: reduce ) { |
| 296 |
.desktop-mode-dock__item--attention-pulse .desktop-mode-dock__item-primary, |
| 297 |
.desktop-mode-dock__item--attention-shake .desktop-mode-dock__item-primary, |
| 298 |
.desktop-mode-dock__item--attention-bounce .desktop-mode-dock__item-primary { |
| 299 |
animation: none; |
| 300 |
outline: 2px solid var( --wp-admin-theme-color, #2271b1 ); |
| 301 |
outline-offset: 2px; |
| 302 |
border-radius: 8px; |
| 303 |
} |
| 304 |
} |
| 305 |
|
| 306 |
/* Shared tooltip — placement-specific anchor modifiers applied by JS. */ |
| 307 |
.desktop-mode-dock__tooltip { |
| 308 |
position: fixed; |
| 309 |
padding: 6px 12px; |
| 310 |
background: rgba( 0, 0, 0, 0.85 ); |
| 311 |
color: #fff; |
| 312 |
font-size: 12px; |
| 313 |
font-weight: 400; |
| 314 |
line-height: 1.4; |
| 315 |
white-space: nowrap; |
| 316 |
border-radius: 6px; |
| 317 |
pointer-events: none; |
| 318 |
z-index: calc( var( --desktop-mode-z-dock ) + 1 ); |
| 319 |
opacity: 0; |
| 320 |
transition: opacity 0.15s ease, transform 0.15s ease; |
| 321 |
} |
| 322 |
|
| 323 |
.desktop-mode-dock__tooltip--visible { |
| 324 |
opacity: 1; |
| 325 |
} |
| 326 |
|
| 327 |
/* ------------------------------------------------------------------ |
| 328 |
* Vertical placement (left + right) — dock runs the full shell body |
| 329 |
* height along one edge, with items stacked vertically. |
| 330 |
* ------------------------------------------------------------------ */ |
| 331 |
|
| 332 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="left" ], |
| 333 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="right" ] { |
| 334 |
width: var( --desktop-mode-dock-width ); |
| 335 |
flex-direction: column; |
| 336 |
padding: 16px 0 12px; |
| 337 |
gap: 6px; |
| 338 |
} |
| 339 |
|
| 340 |
/* Left: dock is the first flex item in __body (row layout). */ |
| 341 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="left" ] { |
| 342 |
border-inline-end: 1px solid var( --desktop-mode-dock-border ); |
| 343 |
order: -1; |
| 344 |
} |
| 345 |
|
| 346 |
/* Right: push the dock to the end of __body and flip the border edge. */ |
| 347 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="right" ] { |
| 348 |
border-inline-start: 1px solid var( --desktop-mode-dock-border ); |
| 349 |
order: 1; |
| 350 |
} |
| 351 |
|
| 352 |
/* Active-indicator dot — left dock: inside-edge vertical pill. */ |
| 353 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="left" ] |
| 354 |
.desktop-mode-dock__item--active::before { |
| 355 |
content: ""; |
| 356 |
position: absolute; |
| 357 |
inset-inline-start: -6px; |
| 358 |
top: 50%; |
| 359 |
transform: translateY( -50% ); |
| 360 |
width: 4px; |
| 361 |
height: 4px; |
| 362 |
border-radius: 50%; |
| 363 |
background: #fff; |
| 364 |
} |
| 365 |
|
| 366 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="left" ] |
| 367 |
.desktop-mode-dock__item--focused::before { |
| 368 |
width: 4px; |
| 369 |
height: 16px; |
| 370 |
border-radius: 2px; |
| 371 |
} |
| 372 |
|
| 373 |
/* Right dock: indicator on the opposite edge (inside-facing). */ |
| 374 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="right" ] |
| 375 |
.desktop-mode-dock__item--active::before { |
| 376 |
content: ""; |
| 377 |
position: absolute; |
| 378 |
inset-inline-end: -6px; |
| 379 |
top: 50%; |
| 380 |
transform: translateY( -50% ); |
| 381 |
width: 4px; |
| 382 |
height: 4px; |
| 383 |
border-radius: 50%; |
| 384 |
background: #fff; |
| 385 |
} |
| 386 |
|
| 387 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="right" ] |
| 388 |
.desktop-mode-dock__item--focused::before { |
| 389 |
width: 4px; |
| 390 |
height: 16px; |
| 391 |
border-radius: 2px; |
| 392 |
} |
| 393 |
|
| 394 |
/* "Open another" chip — left: right of tile; right: left of tile. */ |
| 395 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="left" ] |
| 396 |
.desktop-mode-dock__item-new { |
| 397 |
top: 50%; |
| 398 |
inset-inline-end: -13px; |
| 399 |
transform: translateY( -50% ); |
| 400 |
} |
| 401 |
|
| 402 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="left" ] |
| 403 |
.desktop-mode-dock__item-new:hover { |
| 404 |
transform: translateY( -50% ) scale( 1.1 ); |
| 405 |
} |
| 406 |
|
| 407 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="right" ] |
| 408 |
.desktop-mode-dock__item-new { |
| 409 |
top: 50%; |
| 410 |
inset-inline-start: -13px; |
| 411 |
transform: translateY( -50% ); |
| 412 |
} |
| 413 |
|
| 414 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="right" ] |
| 415 |
.desktop-mode-dock__item-new:hover { |
| 416 |
transform: translateY( -50% ) scale( 1.1 ); |
| 417 |
} |
| 418 |
|
| 419 |
/* Separator — horizontal hairline between menu tiles and system |
| 420 |
* tiles, with margin-top: auto pushing system items to the bottom. |
| 421 |
* The `--group` variant is used inline between core and plugin |
| 422 |
* menu tiles; it keeps the hairline styling but drops the auto |
| 423 |
* margin so it sits exactly where it's inserted. */ |
| 424 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="left" ] |
| 425 |
.desktop-mode-dock__separator, |
| 426 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="right" ] |
| 427 |
.desktop-mode-dock__separator { |
| 428 |
width: 60%; |
| 429 |
height: 1px; |
| 430 |
margin: 8px auto 4px; |
| 431 |
background: var( --desktop-mode-dock-border ); |
| 432 |
flex-shrink: 0; |
| 433 |
margin-top: auto; |
| 434 |
} |
| 435 |
|
| 436 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="left" ] |
| 437 |
.desktop-mode-dock__separator--group, |
| 438 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="right" ] |
| 439 |
.desktop-mode-dock__separator--group { |
| 440 |
margin: 10px auto; |
| 441 |
background: rgba( 255, 255, 255, 0.22 ); |
| 442 |
} |
| 443 |
|
| 444 |
/* |
| 445 |
* Hide the separator when nothing precedes it. The TS code creates |
| 446 |
* a system / pinned separator before its first cluster item — on a |
| 447 |
* clean install with only system items and no menu items, the |
| 448 |
* separator becomes the dock's first child and would render as a |
| 449 |
* stray hairline with nothing to divide. |
| 450 |
*/ |
| 451 |
.desktop-mode-dock__separator:first-child { |
| 452 |
display: none; |
| 453 |
} |
| 454 |
|
| 455 |
/* Tooltip — anchor modifiers are applied directly to the tooltip |
| 456 |
* element (NOT via a descendant selector on `.desktop-mode-dock`) |
| 457 |
* because the tooltip lives in `document.body`. JS writes the |
| 458 |
* absolute `top` / `left` coords; CSS handles the slide-in |
| 459 |
* animation direction per modifier. |
| 460 |
* |
| 461 |
* - `--after` : left-placed dock (tooltip to the RIGHT of tile) |
| 462 |
* - `--before` : right-placed dock (tooltip to the LEFT of tile) |
| 463 |
* - `--above` : bottom-placed dock (tooltip ABOVE the tile) |
| 464 |
*/ |
| 465 |
|
| 466 |
/* Left dock — tooltip slides in from the left by 4px. JS sets |
| 467 |
* `left` to `tile.right + 8px`; the transform animates the entry. */ |
| 468 |
.desktop-mode-dock__tooltip--after { |
| 469 |
transform: translateX( -4px ); |
| 470 |
} |
| 471 |
|
| 472 |
.desktop-mode-dock__tooltip--after.desktop-mode-dock__tooltip--visible { |
| 473 |
transform: translateX( 0 ); |
| 474 |
} |
| 475 |
|
| 476 |
.desktop-mode-dock__tooltip--before { |
| 477 |
/* Right-placed dock — tooltip sits to the left of the tile. JS |
| 478 |
* writes the left coord to the tile's left edge; this translate |
| 479 |
* pulls the tooltip further left by its own width. */ |
| 480 |
transform: translate( calc( -100% - 8px ), 0 ); |
| 481 |
} |
| 482 |
|
| 483 |
.desktop-mode-dock__tooltip--before.desktop-mode-dock__tooltip--visible { |
| 484 |
transform: translate( calc( -100% - 8px ), 0 ); |
| 485 |
opacity: 1; |
| 486 |
} |
| 487 |
|
| 488 |
/* ------------------------------------------------------------------ |
| 489 |
* Bottom placement — floating macOS-style pill centered above the |
| 490 |
* viewport floor. Absolutely positioned so it floats as pure chrome |
| 491 |
* rather than stealing vertical space from the shell body. |
| 492 |
* ------------------------------------------------------------------ */ |
| 493 |
|
| 494 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="bottom" ] { |
| 495 |
position: absolute; |
| 496 |
inset-inline-start: 0; |
| 497 |
inset-inline-end: 0; |
| 498 |
bottom: 12px; |
| 499 |
margin: 0 auto; |
| 500 |
width: fit-content; |
| 501 |
max-width: calc( 100% - 32px ); |
| 502 |
flex-direction: row; |
| 503 |
justify-content: center; |
| 504 |
padding: 8px 12px; |
| 505 |
gap: 6px; |
| 506 |
border-radius: 18px; |
| 507 |
|
| 508 |
/* Warmer, more saturated glass tint than vertical placements so |
| 509 |
* the floating pill reads as a distinct piece of chrome rather |
| 510 |
* than a section of the sidebar. */ |
| 511 |
background: rgba( 22, 22, 26, 0.42 ); |
| 512 |
backdrop-filter: blur( 28px ) saturate( 170% ); |
| 513 |
-webkit-backdrop-filter: blur( 28px ) saturate( 170% ); |
| 514 |
|
| 515 |
border: 1px solid rgba( 255, 255, 255, 0.12 ); |
| 516 |
border-block-start: 1px solid rgba( 255, 255, 255, 0.18 ); |
| 517 |
box-shadow: |
| 518 |
inset 0 1px 0 rgba( 255, 255, 255, 0.08 ), |
| 519 |
0 10px 32px rgba( 0, 0, 0, 0.45 ); |
| 520 |
} |
| 521 |
|
| 522 |
/* Active-indicator dot — below the tile, macOS-style. */ |
| 523 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="bottom" ] |
| 524 |
.desktop-mode-dock__item--active::before { |
| 525 |
content: ""; |
| 526 |
position: absolute; |
| 527 |
inset-inline-start: 50%; |
| 528 |
top: auto; |
| 529 |
bottom: -4px; |
| 530 |
transform: translateX( -50% ); |
| 531 |
width: 4px; |
| 532 |
height: 4px; |
| 533 |
border-radius: 50%; |
| 534 |
background: #fff; |
| 535 |
} |
| 536 |
|
| 537 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="bottom" ] |
| 538 |
.desktop-mode-dock__item--focused::before { |
| 539 |
width: 16px; |
| 540 |
height: 4px; |
| 541 |
border-radius: 2px; |
| 542 |
} |
| 543 |
|
| 544 |
/* "Open another" chip — floats above the tile's top-right corner so |
| 545 |
* it doesn't collide with neighbouring tiles in the horizontal row. */ |
| 546 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="bottom" ] |
| 547 |
.desktop-mode-dock__item-new { |
| 548 |
top: -6px; |
| 549 |
inset-inline-end: -6px; |
| 550 |
transform: none; |
| 551 |
} |
| 552 |
|
| 553 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="bottom" ] |
| 554 |
.desktop-mode-dock__item-new:hover { |
| 555 |
transform: scale( 1.1 ); |
| 556 |
} |
| 557 |
|
| 558 |
/* Separator — vertical hairline between menu tiles and system tiles, |
| 559 |
* with margin-inline-start: auto pushing system items to the end. |
| 560 |
* The `--group` variant keeps the hairline styling for the inline |
| 561 |
* core→plugin boundary but drops the auto margin so it sits where |
| 562 |
* inserted. Tighter margin than the auto variant so the two groups |
| 563 |
* read as related rather than completely isolated. */ |
| 564 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="bottom" ] |
| 565 |
.desktop-mode-dock__separator { |
| 566 |
width: 1px; |
| 567 |
/* Fixed height — `60%` collapses against the floating pill's |
| 568 |
intrinsic height, leaving the hairline effectively invisible. |
| 569 |
28px matches the dock tile inner glyph area. */ |
| 570 |
height: 28px; |
| 571 |
margin: auto 4px auto 8px; |
| 572 |
margin-inline-start: auto; |
| 573 |
background: var( --desktop-mode-dock-border ); |
| 574 |
flex-shrink: 0; |
| 575 |
} |
| 576 |
|
| 577 |
/* |
| 578 |
* Group separator — sits inline between the core cluster and the |
| 579 |
* plugin cluster. Brighter than the menu-vs-system separator because |
| 580 |
* it carries user meaning ("this is where your installed apps |
| 581 |
* begin"), and flanked by extra gap so the boundary reads at a |
| 582 |
* glance rather than disappearing into the dock tint. |
| 583 |
*/ |
| 584 |
.desktop-mode-dock[ data-desktop-mode-dock-placement="bottom" ] |
| 585 |
.desktop-mode-dock__separator--group { |
| 586 |
width: 1px; |
| 587 |
height: 60%; |
| 588 |
margin: auto 10px; |
| 589 |
margin-inline-start: 10px; |
| 590 |
background: rgba( 255, 255, 255, 0.22 ); |
| 591 |
flex-shrink: 0; |
| 592 |
} |
| 593 |
|
| 594 |
/* Tooltip — above the hovered tile. JS writes the horizontal center |
| 595 |
* + a top near the tile's top edge; CSS translates the tooltip up by |
| 596 |
* its own height so it clears the tile. */ |
| 597 |
.desktop-mode-dock__tooltip--above { |
| 598 |
inset-inline-start: auto; |
| 599 |
transform: translate( -50%, calc( -100% - 4px ) ); |
| 600 |
} |
| 601 |
|
| 602 |
.desktop-mode-dock__tooltip--above.desktop-mode-dock__tooltip--visible { |
| 603 |
transform: translate( -50%, -100% ); |
| 604 |
} |
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
/* Drag-to-reorder (since 0.25.0). |
| 609 |
* |
| 610 |
* The dragged tile follows the cursor via inline `transform: |
| 611 |
* translate()` written from JS. It stays IN flow so flex doesn't |
| 612 |
* collapse the row — the visual lift is a z-index bump and |
| 613 |
* `pointer-events: none` so `elementFromPoint` finds siblings |
| 614 |
* underneath the cursor. Sibling tiles animate via FLIP — the JS |
| 615 |
* writes inline `transform` + `transition` per leg, so no CSS |
| 616 |
* transition is declared here (it would race with the per-leg |
| 617 |
* inline transition). */ |
| 618 |
.desktop-mode-dock__item--dragging { |
| 619 |
pointer-events: none; |
| 620 |
z-index: 50; |
| 621 |
opacity: 0.92; |
| 622 |
cursor: grabbing; |
| 623 |
will-change: transform; |
| 624 |
/* Subtle shadow so the dragged tile reads as "lifted" against |
| 625 |
* the dock surface it floats above. */ |
| 626 |
filter: drop-shadow( 0 6px 12px rgba( 0, 0, 0, 0.35 ) ); |
| 627 |
} |
| 628 |
|
| 629 |
.desktop-mode-dock__item:not( .desktop-mode-dock__item--system ) { |
| 630 |
cursor: grab; |
| 631 |
} |
| 632 |
|
| 633 |
.desktop-mode-dock__item:not( .desktop-mode-dock__item--system ):active { |
| 634 |
cursor: grabbing; |
| 635 |
} |
| 636 |
|