PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.13
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.13
1.1.13 1.1.12 1.1.11 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 All 37 releases
desktop-mode / assets / css / notes.css

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

591 lines 15.6 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 /* Let the ink shrink inside the paper's max-height and scroll,
362 rather than spill past the paper's bottom edge. */
363 min-height: 0;
364 font-family: var(--dm-note-hand-font);
365 }
366
367 .os-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 scrollbar-width: thin;
377 scrollbar-color: color-mix(in srgb, var(--dm-note-ink, #4d4419) 28%, transparent)
378 transparent;
379 }
380
381 /* Long notes: the last line fades into the paper instead of being
382 sliced mid-glyph, so it reads as "keep scrolling", not "cut off".
383 `data-more-below` drops once the reader reaches the end, so the
384 final line is never left faded. */
385 .os-pinned-note__editor[data-more-below]::part(textarea),
386 .os-pinned-note__body[data-more-below] {
387 -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
388 mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
389 }
390
391 .os-pinned-note__body {
392 flex: 1 1 auto;
393 min-height: 0;
394 overflow-y: auto;
395 scrollbar-width: thin;
396 scrollbar-color: color-mix(in srgb, var(--dm-note-ink, #4d4419) 28%, transparent)
397 transparent;
398 font-family: var(--dm-note-hand-font);
399 font-size: 14px;
400 line-height: 1.45;
401 white-space: pre-wrap;
402 overflow-wrap: break-word;
403 user-select: text;
404 }
405
406 .os-pinned-note__body::selection {
407 background: var(--dm-note-paper-deep, #f4df7c);
408 }
409
410 .os-pinned-note__footer {
411 display: flex;
412 align-items: center;
413 gap: 4px;
414 justify-content: flex-start;
415 min-height: 16px;
416 }
417
418 /* Every action lives here rather than in the meta row. The pushpin is
419 painted over the paper's chrome and covers note-relative x 62–138
420 across its ±10px jitter, which is the middle of that row — it only
421 ever had room for two controls clear of the pin, and a third landed
422 underneath where a pointer couldn't reach it.
423
424 Fades as a group on hover/focus, the same way the meta row does, so
425 each button keeps its own 0.75 → 1 hover on top. No gap: each button
426 is a 30px box around a 20px glyph, so its own padding is the spacing. */
427 .os-pinned-note__actions {
428 display: flex;
429 align-items: center;
430 opacity: 0;
431 transition: opacity 150ms ease-out;
432 }
433
434 .os-pinned-note:hover .os-pinned-note__actions,
435 .os-pinned-note:focus-within .os-pinned-note__actions {
436 opacity: 1;
437 }
438
439 .os-pinned-note__status {
440 opacity: 0.6;
441 }
442
443 /* "Move to Trash" — same treatment as the other two actions. It does
444 NOT redden on hover: the other two only brighten, and one action
445 changing hue made the row look inconsistent. The confirm dialog it
446 opens is the danger cue. */
447 .os-pinned-note__trash {
448 --os-ui-btn-color: var(--dm-note-ink-soft);
449 opacity: 0.75;
450 }
451
452 .os-pinned-note__trash:hover {
453 opacity: 1;
454 }
455
456 .os-pinned-note__trash svg {
457 width: 20px;
458 height: 20px;
459 fill: var(--dm-note-ink, #4d4419);
460 }
461
462 /* Author sticker on read-only public notes — always visible. */
463 .os-pinned-note__attribution {
464 display: inline-flex;
465 align-items: center;
466 gap: 6px;
467 align-self: flex-start;
468 margin-top: 8px;
469 padding: 2px 8px 2px 3px;
470 border: 1px solid var(--dm-note-paper-deep, #f4df7c);
471 border-radius: 999px;
472 background: color-mix(in srgb, var(--dm-note-paper, #fff3a6) 70%, #fff);
473 font-size: 11px;
474 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
475 sans-serif;
476 color: var(--dm-note-ink-soft, rgba(0, 0, 0, 0.55));
477 }
478
479 /* ------------------------------------------------------------------
480 Drag states
481 ------------------------------------------------------------------ */
482
483 /* The imprint: while the pin is out, the real note stays as a faint
484 "where it was" mark. Class stamped by the DragManager at lift. */
485 .os-pinned-note.os-file-tile--dragging {
486 opacity: 0.18;
487 filter: saturate(0.3);
488 }
489
490 .os-pinned-note.os-file-tile--dragging .os-pinned-note__paper {
491 box-shadow: none;
492 }
493
494 /* Keyboard move mode: carried look on the real note. */
495 .os-pinned-note--move-mode .os-pinned-note__paper {
496 box-shadow:
497 0 3px 5px rgba(0, 0, 0, 0.2),
498 0 26px 48px -10px rgba(0, 0, 0, 0.42),
499 inset 0 1px 0 rgba(255, 255, 255, 0.35);
500 }
501
502 /* The ghost — the note you're carrying by its pin. The DragManager
503 owns the ROOT's transform; the pendulum owns the swing wrapper. */
504 .os-pinned-note-ghost {
505 position: relative;
506 }
507
508 .os-pinned-note-ghost__swing {
509 position: relative;
510 width: 100%;
511 height: 100%;
512 }
513
514 .os-pinned-note-ghost .os-pinned-note__pin {
515 pointer-events: none;
516 }
517
518 .os-pinned-note-ghost__paper {
519 /* Clearly airborne. */
520 transform: scale(1.04) rotate(2.5deg);
521 transform-origin: 50% 14px;
522 box-shadow:
523 0 3px 5px rgba(0, 0, 0, 0.18),
524 0 26px 48px -10px rgba(0, 0, 0, 0.42),
525 inset 0 1px 0 rgba(255, 255, 255, 0.35);
526 min-height: 160px;
527 padding: 24px 14px 14px;
528 position: relative;
529 display: flex;
530 flex-direction: column;
531 background:
532 radial-gradient(
533 90px 50px at 50% 0,
534 rgba(255, 255, 255, 0.45),
535 transparent 70%
536 ),
537 linear-gradient(
538 174deg,
539 color-mix(in srgb, var(--dm-note-paper, #fff3a6) 88%, #fff) 0%,
540 var(--dm-note-paper, #fff3a6) 46%,
541 var(--dm-note-paper-deep, #f4df7c) 100%
542 );
543 color: var(--dm-note-ink, #4d4419);
544 border-radius: 2px;
545 }
546
547 /* Over the recycle bin: the paper knows what's coming. */
548 .os-pinned-note-ghost--doom .os-pinned-note-ghost__paper {
549 transform: scale(0.88);
550 filter: saturate(0.75) brightness(0.95);
551 animation: dm-note-doom-shiver 180ms ease-in-out infinite alternate;
552 }
553
554 @keyframes dm-note-doom-shiver {
555 from {
556 rotate: -1.5deg;
557 }
558
559 to {
560 rotate: 1.5deg;
561 }
562 }
563
564 /* The one-shot "thunk" ripple at the pin anchor. */
565 .os-pinned-note__ripple {
566 position: absolute;
567 left: calc(50% + var(--dm-pin-dx, 0px) - 4px);
568 top: 6px;
569 width: 8px;
570 height: 8px;
571 border-radius: 50%;
572 pointer-events: none;
573 z-index: 3;
574 }
575
576 /* ------------------------------------------------------------------
577 Reduced motion
578 ------------------------------------------------------------------ */
579
580 @media (prefers-reduced-motion: reduce) {
581 .os-pinned-note__paper,
582 .dm-notes-pad__sheet {
583 transition: none;
584 }
585
586 .os-pinned-note-ghost--doom .os-pinned-note-ghost__paper {
587 animation: none;
588 transform: scale(0.92);
589 }
590 }
591