PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / trunk
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin vtrunk
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 0.8.6 All 33 releases
desktop-mode / assets / css / notes.css

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

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