oficina / mapa Public

Clone
git clone https://amadan.net/oficina/mapa

Plain git — no account needed to clone.

Download

Download this file

1/* mapa.css: this app's own CSS, beside estilo's theme.
2 *
3 * Everything here is something rastrillo's ui partials do not provide.
4 * It is prefixed mapa-, never rst-, so the line between the framework's
5 * vocabulary and this app's is visible in the markup. Only tokens.css
6 * custom properties are used, so Calma and the light/dark switch apply.
7 *
8 * Calma's rules (estilo AGENTS.md, "Theme"): inside an app only the icons
9 * carry colour; the accent is for the one primary action and the current
10 * selection; white cards on a cool page, 12px shapes, one grey scale.
11 */
12
13[mapa-brand] {
14 display: inline-flex;
15 align-items: center;
16 gap: var(--rst-sp-2);
17 font-weight: 600;
18}
19
20/* ---- Quiet secondary text. */
21[mapa-meta] {
22 color: var(--rst-text-muted);
23 font-size: var(--rst-fs-sm);
24 margin: 0;
25}
26
27[mapa-actions] {
28 display: flex;
29 flex-wrap: wrap;
30 align-items: center;
31 gap: var(--rst-sp-2);
32}
33[mapa-body] {
34 line-height: 1.7;
35 overflow-wrap: anywhere;
36}
37[mapa-body] > :first-child { margin-block-start: 0; }
38[mapa-body] > :last-child { margin-block-end: 0; }
39[mapa-body] blockquote,
40[mapa-context] blockquote {
41 margin-inline: 0;
42 padding-inline-start: var(--rst-sp-3);
43 border-inline-start: 3px solid var(--rst-line-strong);
44 color: var(--rst-text-muted);
45}
46[mapa-body] pre,
47[mapa-source-text] {
48 background: var(--rst-surface-2);
49 border-radius: var(--rst-radius-sm);
50 padding: var(--rst-sp-3);
51 overflow-x: auto;
52 white-space: pre-wrap;
53}
54[mapa-body] code { font-size: 0.92em; }
55[mapa-body] hr { border: 0; border-block-start: 1px solid var(--rst-line); }
56
57/* ---- Links between pages. A pending link names no page yet: dashed,
58 * and muted, so it never passes for one that leads somewhere. The text
59 * label is its own; the style only repeats it. */
60a[mapa-link] { text-decoration-thickness: 1px; }
61a[mapa-link="pending"] {
62 color: var(--rst-text-muted);
63 text-decoration-style: dashed;
64}
65[mapa-link="broken"] { color: var(--rst-text-muted); }
66[mapa-note], [mapa-embed] { color: var(--rst-text-muted); }
67
68/* ---- Backlinks and mentions: each linking page with its blocks. */
69[mapa-linked] h2 { font-size: var(--rst-fs-lg); }
70[mapa-sources] {
71 list-style: none;
72 margin: 0;
73 padding: 0;
74 display: grid;
75 gap: var(--rst-sp-2);
76}
77[mapa-sources] > li {
78 background: var(--rst-surface);
79 border: 1px solid var(--rst-line);
80 border-radius: var(--rst-radius);
81 padding: var(--rst-sp-3) var(--rst-sp-4);
82}
83[mapa-source] { font-weight: 600; }
84[mapa-context] {
85 display: flex;
86 align-items: baseline;
87 justify-content: space-between;
88 gap: var(--rst-sp-3);
89 color: var(--rst-text-muted);
90}
91[mapa-context] > :first-child { margin-block: var(--rst-sp-1) 0; }
92[mapa-context] ul, [mapa-context] ol { padding-inline-start: var(--rst-sp-5); }
93[mapa-link-it] { flex: none; }
94
95/* ---- A plain list of pages: a title over a muted line, no bullets. */
96[mapa-list] {
97 list-style: none;
98 margin: 0 0 var(--rst-sp-4);
99 padding: 0;
100 background: var(--rst-surface);
101 border: 1px solid var(--rst-line);
102 border-radius: var(--rst-radius);
103}
104[mapa-list] > li {
105 display: flex;
106 flex-wrap: wrap;
107 align-items: baseline;
108 justify-content: space-between;
109 gap: var(--rst-sp-2);
110 padding: var(--rst-sp-3) var(--rst-sp-4);
111 border-block-end: 1px solid var(--rst-line);
112}
113[mapa-list] > li:last-child { border-block-end: 0; }
114[mapa-list] a { font-weight: 600; }
115
116/* ---- The editor: Markdown in a monospace box as tall as the screen. */
117[mapa-editor] {
118 font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
119 font-size: var(--rst-fs-base);
120 line-height: 1.6;
121 min-block-size: 50vh;
122}
123
124/* ---- Make team page: each block a choice, drawn as it reads. */
125[mapa-choose] {
126 border: 0;
127 margin: 0;
128 padding: 0;
129 display: grid;
130 gap: var(--rst-sp-2);
131}
132[mapa-choose] legend { font-weight: 600; margin-block-end: var(--rst-sp-2); }
133[mapa-choice] {
134 display: flex;
135 gap: var(--rst-sp-3);
136 align-items: baseline;
137 background: var(--rst-surface);
138 border: 1px solid var(--rst-line);
139 border-radius: var(--rst-radius);
140 padding: var(--rst-sp-2) var(--rst-sp-3);
141 cursor: pointer;
142}
143[mapa-choice]:has(input:checked) {
144 border-color: var(--rst-accent);
145 background: var(--rst-accent-soft);
146}
147[mapa-choice-body] > :first-child { margin-block: 0; }
148
149/* ---- Search: the box and its button on one row. */
150[mapa-search-row] {
151 display: flex;
152 gap: var(--rst-sp-2);
153 align-items: center;
154}
155[mapa-search-row] input { flex: 1; min-inline-size: 0; }
156
157[mapa-results] > li { display: block; }
158[mapa-result] p { margin-block-start: var(--rst-sp-1); }
159
160/* ---- The conflict view: each disputed block a choice between sides. */
161[mapa-hunk] {
162 border: 1px dashed var(--rst-line-strong);
163 border-radius: var(--rst-radius);
164 padding: var(--rst-sp-3);
165 margin-block: var(--rst-sp-3);
166 display: grid;
167 gap: var(--rst-sp-2);
168}
169[mapa-hunk] legend { font-weight: 600; padding-inline: var(--rst-sp-1); }
170[mapa-sides] {
171 display: grid;
172 grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
173 gap: var(--rst-sp-3);
174}
175[mapa-sides] h2 { font-size: var(--rst-fs-lg); }
176[mapa-copy] code { user-select: all; }
177
178/* ---- The script layer: status, preview, [[ suggestions, ⌘K. */
179[mapa-status] {
180 color: var(--rst-text-muted);
181 font-size: var(--rst-fs-sm);
182 min-block-size: 1.5em;
183 margin: var(--rst-sp-1) 0 0;
184}
185[mapa-preview]:empty { display: none; }
186[mapa-preview]::before {
187 content: "Preview";
188 display: block;
189 color: var(--rst-text-muted);
190 font-size: var(--rst-fs-xs);
191 text-transform: uppercase;
192 letter-spacing: 0.04em;
193 margin-block-end: var(--rst-sp-2);
194}
195[mapa-suggest],
196[mapa-palette-results] {
197 list-style: none;
198 margin: var(--rst-sp-1) 0 0;
199 padding: var(--rst-sp-1);
200 background: var(--rst-surface);
201 border: 1px solid var(--rst-line);
202 border-radius: var(--rst-radius-sm);
203 box-shadow: var(--rst-shadow-pop);
204 max-block-size: 18rem;
205 overflow-y: auto;
206}
207[mapa-suggest][hidden] { display: none; }
208[mapa-suggest] li,
209[mapa-palette-results] li {
210 padding: var(--rst-sp-1) var(--rst-sp-2);
211 border-radius: var(--rst-radius-sm);
212 cursor: pointer;
213}
214[mapa-palette-results] li { display: grid; }
215[mapa-suggest] li[aria-selected="true"],
216[mapa-palette-results] li[aria-selected="true"] {
217 background: var(--rst-accent-soft);
218}
219[mapa-palette-results]:empty { display: none; }
220[mapa-palette] {
221 inline-size: min(36rem, calc(100vw - 2rem));
222 margin-block-start: 12vh; /* spacing-allow: the dialog sits a share of the window down, as a palette does */
223 padding: var(--rst-sp-3);
224 border: 1px solid var(--rst-line);
225 border-radius: var(--rst-radius);
226 background: var(--rst-surface);
227 color: var(--rst-text);
228 box-shadow: var(--rst-shadow-pop);
229}
230[mapa-palette]::backdrop { background: var(--rst-overlay); }
231[mapa-palette] input { inline-size: 100%; box-sizing: border-box; }
232
233/* ---- The page editor (level-up §6). Here, never injected (§6.9).
234 * ProseMirror's own rules, only those that change nothing the server
235 * drew: the article holds no text between blocks once mounted, so
236 * pre-wrap there moves nothing, and ligatures are left as they are. */
237[mapa-body].ProseMirror {
238 position: relative;
239 white-space: pre-wrap;
240 word-wrap: break-word;
241 outline: none;
242}
243[mapa-body].ProseMirror [contenteditable="false"] { white-space: normal; }
244/* The empty writing area around the body takes a click (build note 84,
245 * editor/writearea.mjs), so it shows the text cursor there; what is
246 * drawn on it (the head, bars, the foot, the panel) keeps its own. */
247[mapa-main]:has(> [mapa-doc] > [mapa-body].ProseMirror[contenteditable="true"]) {
248 cursor: text;
249 -webkit-tap-highlight-color: transparent;
250}
251[mapa-main] > [mapa-doc] > :not([mapa-body]) { cursor: auto; }
252.ProseMirror-hideselection *::selection { background: transparent; }
253.ProseMirror-hideselection { caret-color: transparent; }
254.ProseMirror-selectednode { outline: 2px solid var(--rst-accent); outline-offset: 1px; }
255li.ProseMirror-selectednode { outline: none; }
256img.ProseMirror-separator {
257 display: inline !important;
258 border: none !important;
259 margin: 0 !important;
260}
261.ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; }
262.ProseMirror-gapcursor::after {
263 content: "";
264 display: block;
265 position: absolute;
266 inset-block-start: -2px;
267 inline-size: 20px;
268 border-block-start: 1px solid var(--rst-text);
269 animation: mapa-gap-blink 1.1s steps(2, start) infinite;
270}
271@keyframes mapa-gap-blink { to { visibility: hidden; } }
272.ProseMirror-focused .ProseMirror-gapcursor { display: block; }
273@media (prefers-reduced-motion: reduce) {
274 .ProseMirror-gapcursor::after { animation: none; }
275}
276
277/* The inline choice (§6.5): the blocks both of you changed are marked
278 * and read-only until you choose; theirs is drawn beside them. */
279[mapa-body] [mapa-hunk] {
280 background: color-mix(in oklab, var(--rst-accent-soft) 60%, transparent);
281 border-radius: 4px;
282 box-shadow: -10px 0 0 color-mix(in oklab, var(--rst-accent-soft) 60%, transparent);
283}
284[mapa-hunk-choice] {
285 margin: 0 0 var(--rst-sp-2);
286 padding: var(--rst-sp-3);
287 border: 1px solid var(--rst-line);
288 border-radius: var(--rst-radius-sm);
289 background: var(--rst-surface);
290 white-space: normal;
291 user-select: none;
292}
293[mapa-hunk-choice] > p { margin: 0 0 var(--rst-sp-2); }
294[mapa-hunk-theirs] {
295 padding-inline-start: var(--rst-sp-3);
296 border-inline-start: 3px solid var(--rst-line-strong);
297 margin-block-end: var(--rst-sp-2);
298 user-select: text;
299}
300[mapa-hunk-buttons] { display: flex; flex-wrap: wrap; gap: var(--rst-sp-2); }
301
302/* [[ and / (§6.6): a list under the caret, placed by script. */
303[mapa-combo] {
304 position: fixed;
305 z-index: 40;
306 min-inline-size: 14rem;
307 max-inline-size: min(24rem, calc(100vw - 8px));
308 max-block-size: 16rem;
309 overflow-y: auto;
310 margin: 0;
311 padding: var(--rst-sp-1);
312 list-style: none;
313 background: var(--rst-surface);
314 border: 1px solid var(--rst-line);
315 border-radius: var(--rst-radius-sm);
316 box-shadow: var(--rst-shadow-pop);
317 font-size: var(--rst-fs-sm);
318}
319[mapa-combo][hidden] { display: none; }
320[mapa-combo] li {
321 display: flex;
322 justify-content: space-between;
323 gap: var(--rst-sp-3);
324 min-block-size: 24px;
325 padding: var(--rst-sp-1) var(--rst-sp-2);
326 border-radius: var(--rst-radius-sm);
327 cursor: pointer;
328}
329[mapa-combo] li small { color: var(--rst-text-muted); }
330[mapa-combo] li[aria-selected="true"] { background: var(--rst-accent-soft); }
331@media (pointer: coarse) { [mapa-combo] li { min-block-size: 32px; align-items: center; } }
332
333/* The date picker (/ → Date, Insert → Date…; build note 83): the month
334 calendar's look (links.css), at the caret. The chosen day is filled,
335 today ringed; 32px days on a coarse pointer. */
336[mapa-datepick] {
337 position: fixed;
338 z-index: 40;
339 box-sizing: border-box;
340 inline-size: min(264px, calc(100vw - 8px));
341 padding: var(--rst-sp-3);
342 background: var(--rst-surface);
343 border: 1px solid var(--rst-line);
344 border-radius: 12px;
345 box-shadow: var(--rst-shadow-pop);
346 font-size: 12.5px;
347}
348[mapa-datepick]:focus { outline: none; }
349[mapa-datepick-field] {
350 box-sizing: border-box;
351 inline-size: 100%;
352 min-block-size: 30px;
353 margin-block-end: var(--rst-sp-2);
354 padding: var(--rst-sp-1) var(--rst-sp-2);
355 border: 1px solid var(--rst-line-strong);
356 border-radius: 8px;
357 background: var(--rst-surface);
358 color: var(--rst-text);
359 font: inherit;
360}
361[mapa-datepick-head] { display: flex; align-items: center; gap: var(--rst-sp-1); padding: 0 0 var(--rst-sp-2) var(--rst-sp-2); }
362[mapa-datepick-head] strong { flex: 1; font-size: 13.5px; font-weight: 650; }
363[mapa-datepick-head] button {
364 display: inline-grid;
365 place-items: center;
366 inline-size: 26px;
367 block-size: 26px;
368 padding: 0;
369 border: 0;
370 border-radius: 7px;
371 background: none;
372 color: var(--rst-text-muted);
373 cursor: pointer;
374}
375[mapa-datepick-head] button:hover { background: var(--rst-surface-2); color: var(--rst-text); }
376[mapa-datepick-head] svg { inline-size: 15px; block-size: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
377[mapa-datepick] table { inline-size: 100%; border-collapse: collapse; text-align: center; }
378[mapa-datepick] th { padding-block: var(--rst-sp-1); color: var(--rst-text-muted); font-size: 11px; font-weight: 600; }
379[mapa-datepick] td {
380 block-size: 30px;
381 padding: 0;
382 border-radius: 8px;
383 color: var(--rst-text);
384 font-variant-numeric: tabular-nums;
385 cursor: pointer;
386}
387[mapa-datepick] td:hover { background: var(--rst-surface-2); }
388[mapa-datepick] td[mapa-outside] { color: var(--rst-text-muted); }
389[mapa-datepick] td[aria-current] { box-shadow: inset 0 0 0 1.5px var(--rst-accent); }
390[mapa-datepick] td[aria-selected="true"] { background: var(--rst-accent); color: var(--rst-on-accent, #fff); box-shadow: none; }
391[mapa-datepick-note] {
392 position: fixed;
393 z-index: 40;
394 max-inline-size: min(22rem, calc(100vw - 8px));
395 margin: 0;
396 padding: var(--rst-sp-2) var(--rst-sp-3);
397 background: var(--rst-surface);
398 border: 1px solid var(--rst-line);
399 border-radius: 8px;
400 box-shadow: var(--rst-shadow-pop);
401 color: var(--rst-text);
402 font-size: 12.5px;
403}
404[mapa-datepick-said] { min-block-size: 16px; margin: var(--rst-sp-2) var(--rst-sp-2) 0; color: var(--rst-text-muted); font-size: 12px; }
405@media (pointer: coarse) {
406 [mapa-datepick] td { block-size: 36px; }
407 [mapa-datepick-field] { font-size: 16px; }
408 [mapa-datepick-head] button { inline-size: 32px; block-size: 32px; }
409}
410
411/* The selection bubble (§6.6): above the selection, below on touch. */
412[mapa-bubble],
413[mapa-image-bubble] {
414 position: fixed;
415 z-index: 40;
416 display: flex;
417 gap: var(--rst-sp-1);
418 padding: var(--rst-sp-1);
419 background: var(--rst-surface);
420 border: 1px solid var(--rst-line);
421 border-radius: var(--rst-radius-sm);
422 box-shadow: var(--rst-shadow-pop);
423 transition: opacity 120ms ease;
424}
425[mapa-bubble][hidden],
426[mapa-image-bubble][hidden] { display: none; }
427[mapa-bubble] button,
428[mapa-image-bubble] button {
429 min-inline-size: 28px;
430 min-block-size: 28px;
431 padding: 0 var(--rst-sp-2);
432 border: 0;
433 border-radius: 6px;
434 background: none;
435 color: var(--rst-text);
436 font: inherit;
437 font-size: var(--rst-fs-sm);
438 cursor: pointer;
439}
440[mapa-bubble] button[aria-pressed="true"],
441[mapa-bubble] button:hover,
442[mapa-image-bubble] button:hover { background: var(--rst-surface-2); }
443[mapa-bubble] button:focus-visible,
444[mapa-image-bubble] button:focus-visible { outline: 2px solid var(--rst-accent); }
445[mapa-bubble] button[aria-label="Bold"] { font-weight: 700; }
446[mapa-bubble] button[aria-label="Italic"] { font-style: italic; }
447[mapa-bubble] button[aria-label="Code"] { font-family: ui-monospace, monospace; }
448[mapa-bubble] { flex-wrap: wrap; max-inline-size: calc(100vw - 8px); }
449[mapa-bubble-field],
450[mapa-bubble-page] { inline-size: 14rem; max-inline-size: 100%; font-size: 16px; }
451[mapa-bubble-page][hidden] { display: none; }
452/* Why a selection cannot be a page link (build note 81): a line of its
453 own under the buttons; empty, it takes no room but stays a live
454 region, so what it says next is announced. */
455[mapa-bubble-note] {
456 flex-basis: 100%;
457 max-inline-size: 22rem;
458 margin: 0;
459 padding: 0 var(--rst-sp-2) var(--rst-sp-1);
460 color: var(--rst-text-muted);
461 font-size: var(--rst-fs-sm);
462}
463[mapa-bubble-note]:empty {
464 position: absolute;
465 inline-size: 1px;
466 block-size: 1px;
467 padding: 0;
468 overflow: hidden;
469 clip-path: inset(50%);
470}
471@media (pointer: coarse) { [mapa-bubble] button { min-inline-size: 36px; min-block-size: 36px; } }
472@media (prefers-reduced-motion: reduce) { [mapa-bubble] { transition: none; } }
473
474/* A block's ¶ (§6.3): out of the text's flow, so it moves nothing. */
475[mapa-anchor] {
476 position: absolute;
477 margin-inline-start: -28px; /* spacing-allow: the ¶ hangs in the margin, its 24px box 4px clear of the text */
478 inline-size: 24px;
479 block-size: 24px;
480 padding: 0;
481 border: 0;
482 border-radius: 6px;
483 background: none;
484 color: var(--rst-text-faint);
485 font: inherit;
486 line-height: 24px;
487 cursor: pointer;
488 opacity: 0;
489}
490:is(p, h2, h3, h4, h5, h6, li, blockquote):hover > [mapa-anchor],
491[mapa-anchor]:focus-visible,
492[mapa-anchor][data-copied] { opacity: 1; }
493[mapa-anchor][data-copied] { color: var(--rst-accent); }
494@media (pointer: coarse) { [mapa-anchor] { display: none; } }
495
496/* Make team page (§6.7): the blocks that will move are tinted first. */
497[mapa-body] [mapa-moving] {
498 background: var(--rst-accent-soft);
499 border-radius: 4px;
500 box-shadow: -8px 0 0 var(--rst-accent-soft), 8px 0 0 var(--rst-accent-soft);
501}
502[mapa-make-team] {
503 inline-size: min(28rem, calc(100vw - 2rem));
504 padding: var(--rst-sp-4);
505 border: 1px solid var(--rst-line);
506 border-radius: var(--rst-radius);
507 background: var(--rst-surface);
508 color: var(--rst-text);
509 box-shadow: var(--rst-shadow-pop);
510}
511[mapa-make-team]::backdrop { background: var(--rst-overlay); }
512[mapa-make-team] h2 { margin: 0 0 var(--rst-sp-3); font-size: var(--rst-fs-lg); }
513[mapa-make-team] label { display: block; margin-block-end: var(--rst-sp-1); }
514[mapa-make-team] input { inline-size: 100%; box-sizing: border-box; font-size: 16px; }
515[mapa-make-team] p { color: var(--rst-text-muted); font-size: var(--rst-fs-sm); }
516[mapa-make-team-error]:empty { display: none; }
517[mapa-make-team-error] { color: var(--rst-danger, var(--rst-text)); }
518[mapa-make-team-foot] { display: flex; justify-content: flex-end; gap: var(--rst-sp-2); }
519
520/* A task's box in the editor (§6.11): a named button laid over the box
521 * the server draws, out of the flow. The box's own alternative text
522 * gives way to the button's name, so it is read once. */
523[mapa-body].ProseMirror li[mapa-task] > p::before { content: ""; content: "" / ""; }
524[mapa-task-box] {
525 position: absolute;
526 inline-size: 24px;
527 block-size: 24px;
528 /* spacing-allow: the button is centred on the box the server draws in the list item's marker area (prose.css) */
529 margin-inline-start: calc(-1.35em - 4.5px);
530 margin-block-start: -1px; /* spacing-allow: centred on the drawn box, as above */
531 padding: 0;
532 border: 0;
533 border-radius: 6px;
534 background: none;
535 cursor: pointer;
536}
537[mapa-task-box]:focus-visible { outline: 2px solid var(--rst-accent); }
538@media (pointer: coarse) {
539 [mapa-task-box] {
540 inline-size: 32px;
541 block-size: 32px;
542 /* spacing-allow: the 32px target centred on the drawn box, as above */
543 margin-inline-start: calc(-1.35em - 8.5px);
544 margin-block-start: -5px; /* spacing-allow: centred on the drawn box, as above */
545 }
546}
547
548/* The phone's row over the keyboard (§6.11, D6). */
549[mapa-accessory] {
550 position: fixed;
551 inset-inline: 0;
552 bottom: 0;
553 z-index: 45;
554 display: flex;
555 gap: var(--rst-sp-1);
556 overflow-x: auto;
557 padding: var(--rst-sp-1) max(var(--rst-sp-1), env(safe-area-inset-left));
558 background: var(--rst-surface);
559 border-block-start: 1px solid var(--rst-line);
560}
561[mapa-accessory][hidden] { display: none; }
562[mapa-accessory] button {
563 flex: none;
564 min-inline-size: 44px;
565 min-block-size: 36px;
566 padding: 0 var(--rst-sp-2);
567 border: 0;
568 border-radius: 8px;
569 background: none;
570 color: var(--rst-text);
571 font: inherit;
572 font-size: 16px;
573}
574[mapa-accessory] button:active { background: var(--rst-surface-2); }
575[mapa-accessory] button[aria-label="Bold"] { font-weight: 700; }
576[mapa-accessory] button[aria-label="Italic"] { font-style: italic; }
577/* The Links sheet hides while the keyboard is up (§4.3). */
578html[data-mapa-keyboard] aside[mapa-links] [mapa-peek] { display: none; }
579
580/* The in-page title, renamed in place (level-up §4.1, build note 78).
581 Its look does not change when it is edited: the text keeps its face,
582 size and wrap, and the ring is an outline, which takes no room. The
583 note under it is empty, and so takes no room, until a rename says
584 something. */
585h1[mapa-rename] { cursor: text; border-radius: 6px; }
586/* Engines give editable text their own white space (Chromium: pre-wrap,
587 so a line's end space is kept and measured); the title keeps the
588 heading's, so nothing moves when it becomes editable. Spaces typed
589 into it are still kept: the engine writes them as no-break spaces,
590 which the title's whitespace rule reads as spaces. */
591h1[mapa-rename] [mapa-title-text][contenteditable] {
592 outline: none;
593 white-space: inherit;
594 overflow-wrap: inherit;
595 line-break: inherit;
596}
597h1[mapa-rename]:focus-within { outline: 2px solid var(--rst-accent); outline-offset: 4px; }
598h1[mapa-rename] [mapa-title-text][aria-busy="true"] { cursor: progress; }
599[mapa-title-note]:not(:empty) {
600 display: flex;
601 flex-wrap: wrap;
602 align-items: center;
603 gap: var(--rst-sp-2) var(--rst-sp-3);
604 margin-block-start: var(--rst-sp-3);
605 font-size: 14px;
606}
607[mapa-title-note] p { margin: 0; flex: 1 1 16rem; }
608[mapa-title-note] p:has(> [rst-spin]) { display: inline-flex; align-items: center; gap: var(--rst-sp-2); color: var(--rst-text-muted); }
609[mapa-title-note] [role="alert"] { color: var(--rst-danger, var(--rst-text)); }
610
611/* An upload's place (images §4.2): a box at a fixed height with its
612 file's name and progress, or why it failed, with Retry and Remove. */
613[mapa-upload] {
614 display: inline-flex;
615 align-items: center;
616 gap: var(--rst-sp-2);
617 block-size: 2.75rem;
618 max-inline-size: 100%;
619 padding: 0 var(--rst-sp-3);
620 vertical-align: bottom;
621 border: 1px dashed var(--rst-line);
622 border-radius: var(--rst-radius-sm);
623 color: var(--rst-text-muted);
624 font-size: var(--rst-fs-sm);
625 user-select: none;
626}
627[mapa-upload] progress { inline-size: 6rem; }
628[mapa-upload="failed"] { border-color: var(--rst-danger, currentColor); }
629[mapa-upload-name] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-inline-size: 12rem; }
630[mapa-upload] button { min-block-size: 28px; }
631
632/* An image's description, on the image itself (images §4.3, build note
633 I22). The ALT badge sits in the bottom-left corner: filled when the
634 image is described, outlined and always shown when it is not. The
635 field lies over the image's bottom edge, inside its box, on a dark
636 backdrop solid enough to read over a white picture or a black one;
637 a small image gets it in a popover under the badge, over the text
638 below. Neither is in the flow, so nothing moves (L5). */
639[mapa-alt-badge] {
640 position: absolute;
641 inset-inline-start: 6px;
642 inset-block-end: 6px;
643 z-index: 1;
644 min-inline-size: 36px;
645 min-block-size: 24px;
646 padding: 0 var(--rst-sp-2);
647 border: 1.5px solid transparent;
648 border-radius: 999px;
649 background: rgb(255 255 255 / 0.92);
650 box-shadow: 0 0 0 1px rgb(0 0 0 / 0.25);
651 color: #111;
652 font: 700 11px/1 system-ui, sans-serif;
653 letter-spacing: 0.06em;
654 cursor: pointer;
655 opacity: 0;
656 pointer-events: none;
657 transition: opacity 120ms ease;
658}
659[mapa-alt-badge="missing"] {
660 border-color: #fff;
661 background: rgb(17 17 17 / 0.8);
662 color: #fff;
663}
664[mapa-alt-badge="missing"],
665[mapa-image-frame][mapa-image-selected] [mapa-alt-badge],
666[mapa-image-frame][mapa-alt-open] [mapa-alt-badge],
667[mapa-alt-badge]:focus {
668 opacity: 1;
669 pointer-events: auto;
670}
671@media (hover: hover) {
672 [mapa-image-frame]:hover [mapa-alt-badge] { opacity: 1; pointer-events: auto; }
673}
674[mapa-alt-badge]:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: 2px; }
675[mapa-image-frame][mapa-alt-open]:has([mapa-alt="inset"]) [mapa-alt-badge] { visibility: hidden; }
676@media (pointer: coarse) {
677 [mapa-alt-badge] { min-block-size: 32px; min-inline-size: 44px; }
678}
679[mapa-alt] {
680 display: grid;
681 gap: var(--rst-sp-1);
682 font-size: var(--rst-fs-sm);
683 font-weight: 400;
684 font-style: normal;
685 letter-spacing: normal;
686 text-transform: none;
687 line-height: 1.35;
688 white-space: normal;
689 text-align: start;
690 cursor: auto;
691}
692[mapa-alt="inset"] {
693 position: absolute;
694 inset-inline: 0;
695 inset-block-end: 0;
696 z-index: 2;
697 padding: var(--rst-sp-2);
698 background: rgb(17 17 17 / 0.84);
699 color: #fff;
700 border-end-start-radius: var(--rst-radius-sm);
701 border-end-end-radius: var(--rst-radius-sm);
702}
703[mapa-alt="popover"] {
704 position: absolute;
705 inset-block-start: calc(100% + 6px);
706 inset-inline-start: 0;
707 z-index: 40;
708 inline-size: min(22rem, calc(100vw - 16px));
709 padding: var(--rst-sp-2);
710 background: var(--rst-surface);
711 color: var(--rst-text);
712 border: 1px solid var(--rst-line);
713 border-radius: var(--rst-radius-sm);
714 box-shadow: var(--rst-shadow-pop);
715}
716[mapa-alt] textarea {
717 display: block;
718 box-sizing: border-box;
719 inline-size: 100%;
720 min-block-size: 36px;
721 max-block-size: calc(4 * 1.35 * 16px + 10px);
722 max-block-size: calc(4lh + 10px);
723 padding: var(--rst-sp-1) var(--rst-sp-2);
724 border: 1px solid var(--rst-line);
725 border-radius: 6px;
726 background: var(--rst-surface);
727 color: var(--rst-text);
728 font: inherit;
729 font-size: 16px;
730 line-height: 1.35;
731 resize: none;
732 overflow-y: auto;
733}
734[mapa-alt] textarea:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: 1px; }
735@media (prefers-reduced-motion: reduce) {
736 [mapa-alt-badge] { transition: none; }
737}
738@media print {
739 [mapa-alt-badge], [mapa-alt] { display: none !important; }
740}
741
742/* The Markdown screen's Upload and insert, and its images (§4.4). */
743[mapa-upload-field] {
744 display: flex;
745 flex-wrap: wrap;
746 align-items: center;
747 gap: var(--rst-sp-2);
748 border: 0;
749 padding: 0;
750 margin: var(--rst-sp-2) 0 0;
751}
752[mapa-upload-field] [rst-input] { flex: 1 1 14rem; min-inline-size: 0; }
753[mapa-upload-field] [rst-field-hint] { flex-basis: 100%; margin: 0; }
754[mapa-page-images] ul { padding-inline-start: var(--rst-sp-5); }
755[mapa-page-images] li { margin-block: var(--rst-sp-1); }
756[mapa-page-images] a { margin-inline-start: var(--rst-sp-2); }
757