_api-docs.scss
sha256:cedec4d22e410874846e6177be49cfae8255d1fd79dd72f983aa4b98b010aa8b
docs(api): #255 MuseHub API Reference QA contract v2 (repla…
Opus 5.5
minor
⚠ breaking
8 days ago
| 1 | // ── MSign request anatomy figure (musehub#255 V2) ───────────────────────────── |
| 2 | // Used only by /muse/api inside the shared docs figure (.docfig, musehub#242 W7). One real signed request: the |
| 3 | // request line, the six canonical-message lines in order, then the signature and the header that carries it. |
| 4 | // Server-rendered and readable in DOM order without script, so the figure is its own text alternative. No |
| 5 | // motion. Theme tokens only. Accent never colours text (below WCAG AA as text on the light theme, musehub#283): |
| 6 | // it draws the left bar of each line, and every word stays on --text-primary/--text-secondary. |
| 7 | |
| 8 | .msgfig { |
| 9 | display: grid; |
| 10 | gap: var(--space-3); |
| 11 | font-size: 13px; |
| 12 | color: var(--text-primary); |
| 13 | } |
| 14 | |
| 15 | .docfig .msgfig__req { margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; } |
| 16 | .msgfig__reqlabel { font-weight: 700; margin-right: 4px; } |
| 17 | |
| 18 | .docfig .msgfig__lines { |
| 19 | list-style: none; |
| 20 | margin: 0; |
| 21 | padding: 0; |
| 22 | display: grid; |
| 23 | gap: 3px; |
| 24 | } |
| 25 | |
| 26 | .docfig .msgfig__line { |
| 27 | display: grid; |
| 28 | grid-template-columns: 1.4em 7.4em minmax(0, 1fr); |
| 29 | align-items: baseline; |
| 30 | column-gap: var(--space-2); |
| 31 | row-gap: 2px; |
| 32 | margin: 0; |
| 33 | padding: 4px var(--space-2); |
| 34 | border: 1px solid var(--border-default); |
| 35 | border-left: 3px solid var(--color-accent); |
| 36 | border-radius: 4px; |
| 37 | background: var(--bg-surface); |
| 38 | } |
| 39 | |
| 40 | .msgfig__n { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); } |
| 41 | .msgfig__name { font-size: 12px; font-weight: 700; color: var(--text-primary); overflow-wrap: anywhere; } |
| 42 | |
| 43 | .docfig .msgfig__val { |
| 44 | min-width: 0; |
| 45 | font-size: 12px; |
| 46 | color: var(--text-primary); |
| 47 | overflow-wrap: anywhere; |
| 48 | white-space: normal; |
| 49 | } |
| 50 | |
| 51 | .msgfig__note { |
| 52 | grid-column: 3; |
| 53 | font-size: 11px; |
| 54 | line-height: 1.45; |
| 55 | color: var(--text-secondary); |
| 56 | overflow-wrap: anywhere; |
| 57 | } |
| 58 | |
| 59 | .docfig .msgfig__eqs { display: grid; gap: var(--space-2); margin: 0; } |
| 60 | |
| 61 | .msgfig__eq { |
| 62 | min-width: 0; |
| 63 | padding: var(--space-2) var(--space-3); |
| 64 | border: 1px solid var(--border-default); |
| 65 | border-radius: 6px; |
| 66 | background: var(--bg-surface); |
| 67 | } |
| 68 | |
| 69 | .docfig .msgfig__eq dt { margin: 0; font-size: 12px; font-weight: 700; color: var(--text-primary); } |
| 70 | |
| 71 | .docfig .msgfig__eq dd { |
| 72 | margin: 2px 0 0; |
| 73 | font-size: 12px; |
| 74 | line-height: 1.5; |
| 75 | color: var(--text-primary); |
| 76 | overflow-wrap: anywhere; |
| 77 | } |
| 78 | |
| 79 | .docfig .msgfig__eq code, |
| 80 | .docfig .msgfig__note code, |
| 81 | .docfig .msgfig__req code { overflow-wrap: anywhere; white-space: normal; } |
| 82 | |
| 83 | @media (max-width: 480px) { |
| 84 | .docfig .msgfig__line { grid-template-columns: 1.4em minmax(0, 1fr); } |
| 85 | .docfig .msgfig__val, .msgfig__note { grid-column: 2; } |
| 86 | } |
| 87 | |
| 88 | @media (forced-colors: active) { |
| 89 | .docfig .msgfig__line, |
| 90 | .msgfig__eq { border-color: CanvasText; } |
| 91 | } |
| 92 | |
| 93 | // The shared docs styles are below WCAG AA as text on this page (musehub#283): links and inline code fall back to |
| 94 | // the accent-link and purple tokens (1.55:1 and 2.08:1 on the light theme), table headers and the muted second |
| 95 | // column are 2.2:1 (light theme). The shared syntax colours are hard-coded (musehub#288). Interim, scoped to this |
| 96 | // page like /muse/merge, /muse/coordination and /muse/wire; delete when #283 and #288 fix the shared tokens. |
| 97 | .devdocs--api .devdocs-section :is(p, li, td, figcaption) a, |
| 98 | .devdocs--api .devdocs-callout a { |
| 99 | color: var(--text-primary); |
| 100 | text-decoration: underline; |
| 101 | text-underline-offset: 2px; |
| 102 | &:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; } |
| 103 | } |
| 104 | |
| 105 | .devdocs--api :is(.devdocs-section, .devdocs-phase-desc, .devdocs-callout) :is(p, li, td, dd, div) code, |
| 106 | .devdocs--api .devdocs-phase-desc code { color: var(--text-primary); } |
| 107 | |
| 108 | .devdocs--api .devdocs-table { |
| 109 | thead th { color: var(--text-secondary); } |
| 110 | td { color: var(--text-primary); } |
| 111 | } |
| 112 | |
| 113 | .devdocs--api .devdocs-code-block pre { color: var(--text-primary); } |
| 114 | .devdocs--api .devdocs-pre { color: var(--text-primary); } |
| 115 | |
| 116 | // Long unbreakable tokens (sha256:<64-hex>, paths) wrap inside callouts and cells on a phone. |
| 117 | .devdocs--api :not(pre) > code { overflow-wrap: anywhere; } |
| 118 | .devdocs--api .devdocs-callout > div { min-width: 0; } |
| 119 | |
| 120 | // The known-issues table wraps instead of scrolling inside the page on a phone (the shared table is display:block). |
| 121 | .devdocs--api .apiissues { |
| 122 | width: 100%; |
| 123 | table-layout: fixed; |
| 124 | display: table; |
| 125 | overflow: visible; |
| 126 | |
| 127 | th, td { overflow-wrap: anywhere; vertical-align: top; } |
| 128 | th { text-transform: none; letter-spacing: normal; } |
| 129 | td:nth-child(2) { font-family: inherit; } |
| 130 | thead th:nth-child(1) { width: 28%; } |
| 131 | thead th:nth-child(3) { width: 24%; } |
| 132 | @media (max-width: 480px) { font-size: 11px; th, td { padding: 6px 3px; } } |
| 133 | } |
File History
1 commit
sha256:cedec4d22e410874846e6177be49cfae8255d1fd79dd72f983aa4b98b010aa8b
docs(api): #255 MuseHub API Reference QA contract v2 (repla…
Opus 5.5
minor
⚠
8 days ago