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

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

532 lines 14.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Desktop Mode — Pinned notes.
3 *
4 * Paper notes pinned to the wallpaper with a pushpin. Deliberately
5 * differentiated from the window-like Guidelines sticky cards
6 * (`.desktop-mode-sticky-note`): no chrome header, no border, no
7 * resize handle — a pin, a paper, ink.
8 *
9 * The pastel tokens are shared with the Note Pad widget
10 * (`widget-notes.css` consumes them) — keep the slug list in sync
11 * with `desktop_mode_notes_colors()` (PHP) and `src/notes/colors.ts`.
12 */
13
14 /* ------------------------------------------------------------------
15 Pastel paper tokens — light, then dimmed dark-scheme variants
16 ------------------------------------------------------------------ */
17
18 :root {
19 --dm-note-hand-font: "Marker Felt", "Noteworthy", "Segoe Print",
20 "Ink Free", "Comic Sans MS", "Chalkboard SE", cursive;
21
22 --dm-note-butter: #fff3a6;
23 --dm-note-butter-deep: #f4df7c;
24 --dm-note-butter-ink: #4d4419;
25 --dm-note-blush: #ffd9e0;
26 --dm-note-blush-deep: #f5b8c6;
27 --dm-note-blush-ink: #5c2733;
28 --dm-note-sky: #cde9ff;
29 --dm-note-sky-deep: #a9d3f2;
30 --dm-note-sky-ink: #1d3d57;
31 --dm-note-mint: #d4f5dc;
32 --dm-note-mint-deep: #aee3bd;
33 --dm-note-mint-ink: #1e4d2e;
34 --dm-note-lilac: #e6ddff;
35 --dm-note-lilac-deep: #c9bbf0;
36 --dm-note-lilac-ink: #3c2d63;
37 --dm-note-peach: #ffe1c4;
38 --dm-note-peach-deep: #f3c49a;
39 --dm-note-peach-ink: #5c3517;
40 }
41
42 @media (prefers-color-scheme: dark) {
43 :root {
44 --dm-note-butter: #ddc984;
45 --dm-note-butter-deep: #c3ae63;
46 --dm-note-butter-ink: #33290b;
47 --dm-note-blush: #e3b3bd;
48 --dm-note-blush-deep: #cc93a1;
49 --dm-note-blush-ink: #3d1119;
50 --dm-note-sky: #a8c9e0;
51 --dm-note-sky-deep: #88afc9;
52 --dm-note-sky-ink: #0e2436;
53 --dm-note-mint: #aed6ba;
54 --dm-note-mint-deep: #8fbf9e;
55 --dm-note-mint-ink: #123420;
56 --dm-note-lilac: #c2b4e3;
57 --dm-note-lilac-deep: #a695cc;
58 --dm-note-lilac-ink: #241548;
59 --dm-note-peach: #e0bd97;
60 --dm-note-peach-deep: #c9a178;
61 --dm-note-peach-ink: #3a1f07;
62 }
63 }
64
65 /* Per-element paper binding: any element carrying data-note-color
66 (pinned notes, the ghost, the Note Pad's sheets) resolves the
67 generic --dm-note-paper/-deep/-ink triple from its slug. */
68 [data-note-color="butter"] {
69 --dm-note-paper: var(--dm-note-butter);
70 --dm-note-paper-deep: var(--dm-note-butter-deep);
71 --dm-note-ink: var(--dm-note-butter-ink);
72 }
73
74 [data-note-color="blush"] {
75 --dm-note-paper: var(--dm-note-blush);
76 --dm-note-paper-deep: var(--dm-note-blush-deep);
77 --dm-note-ink: var(--dm-note-blush-ink);
78 }
79
80 [data-note-color="sky"] {
81 --dm-note-paper: var(--dm-note-sky);
82 --dm-note-paper-deep: var(--dm-note-sky-deep);
83 --dm-note-ink: var(--dm-note-sky-ink);
84 }
85
86 [data-note-color="mint"] {
87 --dm-note-paper: var(--dm-note-mint);
88 --dm-note-paper-deep: var(--dm-note-mint-deep);
89 --dm-note-ink: var(--dm-note-mint-ink);
90 }
91
92 [data-note-color="lilac"] {
93 --dm-note-paper: var(--dm-note-lilac);
94 --dm-note-paper-deep: var(--dm-note-lilac-deep);
95 --dm-note-ink: var(--dm-note-lilac-ink);
96 }
97
98 [data-note-color="peach"] {
99 --dm-note-paper: var(--dm-note-peach);
100 --dm-note-paper-deep: var(--dm-note-peach-deep);
101 --dm-note-ink: var(--dm-note-peach-ink);
102 }
103
104 [data-note-color] {
105 /* Static fallback first; color-mix() where supported. */
106 --dm-note-ink-soft: rgba(0, 0, 0, 0.55);
107 --dm-note-ink-soft: color-mix(
108 in srgb,
109 var(--dm-note-ink) 62%,
110 var(--dm-note-paper)
111 );
112 }
113
114 /* ------------------------------------------------------------------
115 Layer root
116 ------------------------------------------------------------------ */
117
118 .desktop-mode-notes {
119 position: absolute;
120 inset: 0;
121 z-index: 2;
122 pointer-events: none;
123 }
124
125 /* Mission-control style overview hides the wall, like the sticky
126 layer does. */
127 .desktop-mode-area--overview .desktop-mode-notes {
128 display: none;
129 }
130
131 .desktop-mode-notes__live {
132 position: absolute;
133 width: 1px;
134 height: 1px;
135 overflow: hidden;
136 clip-path: inset(50%);
137 }
138
139 /* ------------------------------------------------------------------
140 The pinned note
141 ------------------------------------------------------------------ */
142
143 .desktop-mode-pinned-note {
144 position: absolute;
145 width: 208px;
146 pointer-events: auto;
147 transform: rotate(var(--dm-note-rot, 0deg));
148 /* The note hangs FROM the pin. */
149 transform-origin: calc(50% + var(--dm-pin-dx, 0px)) 14px;
150 }
151
152 .desktop-mode-pinned-note__paper {
153 position: relative;
154 min-height: 190px;
155 max-height: 320px;
156 display: flex;
157 flex-direction: column;
158 padding: 24px 14px 14px;
159 background:
160 radial-gradient(
161 90px 50px at calc(50% + var(--dm-pin-dx, 0px)) 0,
162 rgba(255, 255, 255, 0.45),
163 transparent 70%
164 ),
165 linear-gradient(
166 174deg,
167 color-mix(in srgb, var(--dm-note-paper, #fff3a6) 88%, #fff) 0%,
168 var(--dm-note-paper, #fff3a6) 46%,
169 var(--dm-note-paper-deep, #f4df7c) 100%
170 );
171 color: var(--dm-note-ink, #4d4419);
172 border-radius: 2px; /* paper, not UI card */
173 box-shadow:
174 0 1px 2px rgba(0, 0, 0, 0.18),
175 0 10px 22px -6px rgba(0, 0, 0, 0.28),
176 inset 0 1px 0 rgba(255, 255, 255, 0.35);
177 transition: box-shadow 200ms ease-out;
178 }
179
180 /* Focus = the paper lifts a hair; never an outline rectangle. */
181 .desktop-mode-pinned-note:focus-within .desktop-mode-pinned-note__paper {
182 box-shadow:
183 0 2px 3px rgba(0, 0, 0, 0.18),
184 0 12px 26px -6px rgba(0, 0, 0, 0.34),
185 inset 0 1px 0 rgba(255, 255, 255, 0.35),
186 inset 0 -2px 0
187 color-mix(
188 in srgb,
189 var(--wp-admin-theme-color, #3858e9) 55%,
190 transparent
191 );
192 }
193
194 /* ------------------------------------------------------------------
195 The pushpin
196 ------------------------------------------------------------------ */
197
198 .desktop-mode-pinned-note__pin {
199 position: absolute;
200 /* Needle tip lands at (50% + dx, 10px) of the note. Tip fractions
201 from assets/images/pushpin.svg: 57.0% / 52.5%. Keep the pixel
202 constants in sync with PIN_WIDTH / PIN_HEIGHT in src/notes/pin.ts. */
203 left: calc(50% + var(--dm-pin-dx, 0px) - 56px * 0.57);
204 top: calc(10px - 52px * 0.525);
205 width: 56px;
206 height: 56px;
207 padding: 0;
208 border: none;
209 background: transparent;
210 z-index: 2;
211 cursor: grab;
212 transform: rotate(var(--dm-pin-rot, 0deg));
213 transform-origin: 57% 52.5%;
214 touch-action: none;
215 }
216
217 .desktop-mode-pinned-note__pin:active {
218 cursor: grabbing;
219 }
220
221 .desktop-mode-pinned-note__pin:focus-visible {
222 outline: 2px solid var(--wp-admin-theme-color, #3858e9);
223 outline-offset: 3px;
224 border-radius: 50%;
225 }
226
227 .desktop-mode-pinned-note__pin-img {
228 display: block;
229 width: 56px;
230 height: 52px;
231 pointer-events: none;
232 }
233
234 /* Other users' pins are steel — scenery, not a handle. */
235 .desktop-mode-pinned-note[data-owner="other"] .desktop-mode-pinned-note__pin {
236 cursor: default;
237 pointer-events: none;
238 transform: rotate(var(--dm-pin-rot, 0deg)) scale(0.9);
239 }
240
241 .desktop-mode-pinned-note[data-owner="other"] .desktop-mode-pinned-note__pin-img {
242 filter: saturate(0.12) brightness(1.08) contrast(0.95);
243 }
244
245 /* ------------------------------------------------------------------
246 Owner chrome — hover/focus-revealed
247 ------------------------------------------------------------------ */
248
249 .desktop-mode-pinned-note__meta {
250 position: absolute;
251 inset-inline: 8px;
252 top: 6px;
253 display: flex;
254 align-items: center;
255 gap: 4px;
256 height: 26px;
257 opacity: 0;
258 transition: opacity 150ms ease-out;
259 z-index: 1;
260 }
261
262 /* Push the color dot to the left edge; the action buttons cluster on
263 the right. Keeps a stable layout whether or not the convert button
264 is present (it's gated on the `edit_posts` capability). */
265 .desktop-mode-pinned-note__meta .desktop-mode-pinned-note__color-dot {
266 margin-inline-end: auto;
267 }
268
269 .desktop-mode-pinned-note:hover .desktop-mode-pinned-note__meta,
270 .desktop-mode-pinned-note:focus-within .desktop-mode-pinned-note__meta {
271 opacity: 1;
272 }
273
274 /* Color dot: painted in the NEXT color — the affordance shows the
275 outcome. */
276 .desktop-mode-pinned-note__color-dot {
277 width: 20px;
278 height: 20px;
279 padding: 0;
280 border: 1px solid rgba(0, 0, 0, 0.15);
281 border-radius: 50%;
282 background: var(--dm-note-next-paper, #fff);
283 cursor: pointer;
284 transition: transform 140ms ease-out;
285 }
286
287 .desktop-mode-pinned-note__color-dot:hover {
288 transform: scale(1.25);
289 }
290
291 .desktop-mode-pinned-note__color-dot:focus-visible {
292 outline: 2px solid var(--wp-admin-theme-color, #3858e9);
293 outline-offset: 2px;
294 }
295
296 .desktop-mode-pinned-note__visibility {
297 --wpd-btn-color: var(--dm-note-ink-soft);
298 opacity: 0.75;
299 }
300
301 .desktop-mode-pinned-note__visibility:hover {
302 opacity: 1;
303 }
304
305 .desktop-mode-pinned-note__visibility .dashicons {
306 /* Match the color-cycle dot (20px) — the lock/globe was too easy
307 to miss at dashicons' default size. */
308 font-size: 20px;
309 width: 20px;
310 height: 20px;
311 color: var(--dm-note-ink, #4d4419);
312 }
313
314 /* "Convert to post" — same treatment as the visibility toggle. Only
315 rendered for users who can author posts. */
316 .desktop-mode-pinned-note__convert {
317 --wpd-btn-color: var(--dm-note-ink-soft);
318 opacity: 0.75;
319 }
320
321 .desktop-mode-pinned-note__convert:hover {
322 opacity: 1;
323 }
324
325 .desktop-mode-pinned-note__convert svg {
326 width: 20px;
327 height: 20px;
328 fill: var(--dm-note-ink, #4d4419);
329 }
330
331 /* ------------------------------------------------------------------
332 "Convert to post" drop-target highlight
333 ------------------------------------------------------------------
334 Set on the Posts dock tile / native Posts window body while a note
335 pin is dragged over it (`data-desktop-mode-posts-drop-active`, from
336 src/notes/posts-drop-target.ts). Mirrors the recycle-bin affordance. */
337 .desktop-mode-dock__item[data-menu-slug="menu-posts"][data-desktop-mode-posts-drop-active],
338 .desktop-mode-dock__item[data-menu-slug="editphp"][data-desktop-mode-posts-drop-active] {
339 outline: 2px solid var(--wp-admin-theme-color, #3858e9);
340 outline-offset: 2px;
341 border-radius: 12px;
342 background: color-mix(
343 in srgb,
344 var(--wp-admin-theme-color, #3858e9) 14%,
345 transparent
346 );
347 transition:
348 outline-color 80ms ease,
349 background 80ms ease;
350 }
351
352 [data-desktop-mode-posts-root][data-desktop-mode-posts-drop-active] {
353 position: relative;
354 box-shadow: inset 0 0 0 2px var(--wp-admin-theme-color, #3858e9);
355 transition: box-shadow 80ms ease;
356 }
357
358 /* ------------------------------------------------------------------
359 Ink
360 ------------------------------------------------------------------ */
361
362 .desktop-mode-pinned-note__editor {
363 flex: 1 1 auto;
364 font-family: var(--dm-note-hand-font);
365 }
366
367 .desktop-mode-pinned-note__editor::part(textarea) {
368 background: transparent;
369 border: none;
370 box-shadow: none;
371 color: var(--dm-note-ink, #4d4419);
372 caret-color: var(--dm-note-ink, #4d4419);
373 font-family: var(--dm-note-hand-font);
374 font-size: 14px;
375 line-height: 1.45;
376 }
377
378 .desktop-mode-pinned-note__body {
379 flex: 1 1 auto;
380 overflow-y: auto;
381 font-family: var(--dm-note-hand-font);
382 font-size: 14px;
383 line-height: 1.45;
384 white-space: pre-wrap;
385 overflow-wrap: break-word;
386 user-select: text;
387 }
388
389 .desktop-mode-pinned-note__body::selection {
390 background: var(--dm-note-paper-deep, #f4df7c);
391 }
392
393 .desktop-mode-pinned-note__footer {
394 display: flex;
395 justify-content: flex-start;
396 min-height: 16px;
397 }
398
399 .desktop-mode-pinned-note__status {
400 opacity: 0.6;
401 }
402
403 /* Author sticker on read-only public notes — always visible. */
404 .desktop-mode-pinned-note__attribution {
405 display: inline-flex;
406 align-items: center;
407 gap: 6px;
408 align-self: flex-start;
409 margin-top: 8px;
410 padding: 2px 8px 2px 3px;
411 border: 1px solid var(--dm-note-paper-deep, #f4df7c);
412 border-radius: 999px;
413 background: color-mix(in srgb, var(--dm-note-paper, #fff3a6) 70%, #fff);
414 font-size: 11px;
415 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
416 sans-serif;
417 color: var(--dm-note-ink-soft, rgba(0, 0, 0, 0.55));
418 }
419
420 /* ------------------------------------------------------------------
421 Drag states
422 ------------------------------------------------------------------ */
423
424 /* The imprint: while the pin is out, the real note stays as a faint
425 "where it was" mark. Class stamped by the DragManager at lift. */
426 .desktop-mode-pinned-note.desktop-mode-file-tile--dragging {
427 opacity: 0.18;
428 filter: saturate(0.3);
429 }
430
431 .desktop-mode-pinned-note.desktop-mode-file-tile--dragging .desktop-mode-pinned-note__paper {
432 box-shadow: none;
433 }
434
435 /* Keyboard move mode: carried look on the real note. */
436 .desktop-mode-pinned-note--move-mode .desktop-mode-pinned-note__paper {
437 box-shadow:
438 0 3px 5px rgba(0, 0, 0, 0.2),
439 0 26px 48px -10px rgba(0, 0, 0, 0.42),
440 inset 0 1px 0 rgba(255, 255, 255, 0.35);
441 }
442
443 /* The ghost — the note you're carrying by its pin. The DragManager
444 owns the ROOT's transform; the pendulum owns the swing wrapper. */
445 .desktop-mode-pinned-note-ghost {
446 position: relative;
447 }
448
449 .desktop-mode-pinned-note-ghost__swing {
450 position: relative;
451 width: 100%;
452 height: 100%;
453 }
454
455 .desktop-mode-pinned-note-ghost .desktop-mode-pinned-note__pin {
456 pointer-events: none;
457 }
458
459 .desktop-mode-pinned-note-ghost__paper {
460 /* Clearly airborne. */
461 transform: scale(1.04) rotate(2.5deg);
462 transform-origin: 50% 14px;
463 box-shadow:
464 0 3px 5px rgba(0, 0, 0, 0.18),
465 0 26px 48px -10px rgba(0, 0, 0, 0.42),
466 inset 0 1px 0 rgba(255, 255, 255, 0.35);
467 min-height: 160px;
468 padding: 24px 14px 14px;
469 position: relative;
470 display: flex;
471 flex-direction: column;
472 background:
473 radial-gradient(
474 90px 50px at 50% 0,
475 rgba(255, 255, 255, 0.45),
476 transparent 70%
477 ),
478 linear-gradient(
479 174deg,
480 color-mix(in srgb, var(--dm-note-paper, #fff3a6) 88%, #fff) 0%,
481 var(--dm-note-paper, #fff3a6) 46%,
482 var(--dm-note-paper-deep, #f4df7c) 100%
483 );
484 color: var(--dm-note-ink, #4d4419);
485 border-radius: 2px;
486 }
487
488 /* Over the recycle bin: the paper knows what's coming. */
489 .desktop-mode-pinned-note-ghost--doom .desktop-mode-pinned-note-ghost__paper {
490 transform: scale(0.88);
491 filter: saturate(0.75) brightness(0.95);
492 animation: dm-note-doom-shiver 180ms ease-in-out infinite alternate;
493 }
494
495 @keyframes dm-note-doom-shiver {
496 from {
497 rotate: -1.5deg;
498 }
499
500 to {
501 rotate: 1.5deg;
502 }
503 }
504
505 /* The one-shot "thunk" ripple at the pin anchor. */
506 .desktop-mode-pinned-note__ripple {
507 position: absolute;
508 left: calc(50% + var(--dm-pin-dx, 0px) - 4px);
509 top: 6px;
510 width: 8px;
511 height: 8px;
512 border-radius: 50%;
513 pointer-events: none;
514 z-index: 3;
515 }
516
517 /* ------------------------------------------------------------------
518 Reduced motion
519 ------------------------------------------------------------------ */
520
521 @media (prefers-reduced-motion: reduce) {
522 .desktop-mode-pinned-note__paper,
523 .dm-notes-pad__sheet {
524 transition: none;
525 }
526
527 .desktop-mode-pinned-note-ghost--doom .desktop-mode-pinned-note-ghost__paper {
528 animation: none;
529 transform: scale(0.92);
530 }
531 }
532