gabriel / musehub public
_wire-docs.scss
155 lines 4.9 KB
Raw
sha256:af8b93688057d89c35730de054ab1ce0648f4c405e3ebb884729a1a8b23fcd76 docs(wire): #254 Wire Protocol QA contract v2 (replay of c0… Opus 5.5 minor ⚠ breaking 9 days ago
1 // ── MPack layout figure (musehub#254 V2) ──────────────────────────────────────
2 // Used only by /muse/wire inside the shared docs figure (.docfig, musehub#242 W7). An ordered list of
3 // the byte regions of a real push MPack, each with its offset, size and which of the two hashes covers
4 // it, then the two hash equations. Server-rendered and readable in DOM order without script, so the
5 // figure is its own text alternative. No motion. Theme tokens only. Accent never colours text (below
6 // WCAG AA as text on the light theme, musehub#283); coverage is stated in words, so it never depends on
7 // colour. Doubled .docfig class: the page's paragraph and list rules are more specific.
8
9 .mpkfig {
10 display: grid;
11 gap: var(--space-3);
12 font-size: 13px;
13 color: var(--text-primary);
14 }
15
16 .docfig .mpkfig__map {
17 list-style: none;
18 margin: 0;
19 padding: 0;
20 display: grid;
21 gap: 3px;
22 }
23
24 .docfig .mpkfig__row {
25 display: grid;
26 grid-template-columns: 4.6em minmax(0, 1fr) auto;
27 align-items: baseline;
28 column-gap: var(--space-2);
29 row-gap: 2px;
30 margin: 0;
31 padding: 4px var(--space-2);
32 border: 1px solid var(--border-default);
33 border-left: 3px solid var(--color-accent);
34 border-radius: 4px;
35 background: var(--bg-surface);
36 }
37
38 .docfig .mpkfig__row--footer { border-left-style: dashed; }
39
40 .mpkfig__off,
41 .mpkfig__size {
42 font-family: var(--font-mono);
43 font-size: 12px;
44 color: var(--text-secondary);
45 white-space: nowrap;
46 }
47
48 .mpkfig__size { text-align: right; }
49
50 .mpkfig__name {
51 min-width: 0;
52 font-size: 12px;
53 line-height: 1.45;
54 color: var(--text-primary);
55 overflow-wrap: anywhere;
56 }
57
58 .mpkfig__cov {
59 grid-column: 2 / -1;
60 display: flex;
61 flex-wrap: wrap;
62 gap: 4px;
63 }
64
65 .mpkfig__chip {
66 display: inline-block;
67 padding: 0 6px;
68 border: 1px solid var(--border-default);
69 border-radius: 9px;
70 font-size: 11px;
71 line-height: 1.6;
72 color: var(--text-primary);
73 white-space: nowrap;
74 }
75
76 .mpkfig__chip--yes { border-color: var(--color-accent); }
77 .mpkfig__chip--no { border-style: dashed; color: var(--text-secondary); }
78
79 .docfig .mpkfig__eqs {
80 display: grid;
81 gap: var(--space-2);
82 margin: 0;
83 }
84
85 .mpkfig__eq {
86 min-width: 0;
87 padding: var(--space-2) var(--space-3);
88 border: 1px solid var(--border-default);
89 border-radius: 6px;
90 background: var(--bg-surface);
91 }
92
93 .docfig .mpkfig__eq dt { margin: 0; font-size: 12px; font-weight: 700; color: var(--text-primary); }
94
95 .docfig .mpkfig__eq dd {
96 margin: 2px 0 0;
97 font-size: 12px;
98 line-height: 1.5;
99 color: var(--text-primary);
100 overflow-wrap: anywhere;
101 }
102
103 .docfig .mpkfig__eq code { overflow-wrap: anywhere; white-space: normal; }
104
105 @media (forced-colors: active) {
106 .docfig .mpkfig__row,
107 .mpkfig__chip,
108 .mpkfig__eq { border-color: CanvasText; }
109 }
110
111 // The shared docs styles are below WCAG AA as text on this page (musehub#283): links and inline code fall back to
112 // the accent-link and purple tokens (1.55:1 and 2.08:1 on the light theme), table headers and the muted second
113 // column are 2.2:1 (light theme). The shared syntax colours are hard-coded (musehub#288): every token is 1.7–2.7:1
114 // on the light theme and comments 3.1:1 on the dark theme. Interim, scoped to this page like /muse/merge and
115 // /muse/coordination; delete when #283 and #288 fix the shared tokens.
116 .devdocs--wire .devdocs-section :is(p, li, td, figcaption) a,
117 .devdocs--wire .devdocs-callout a {
118 color: var(--text-primary);
119 text-decoration: underline;
120 text-underline-offset: 2px;
121 &:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
122 }
123
124 .devdocs--wire :is(.devdocs-section, .devdocs-phase-desc, .devdocs-callout) :is(p, li, td, dd, div) code,
125 .devdocs--wire .devdocs-phase-desc code { color: var(--text-primary); }
126
127 .devdocs--wire .devdocs-table {
128 thead th { color: var(--text-secondary); }
129 td { color: var(--text-primary); }
130 }
131
132 .devdocs--wire .devdocs-code-block pre { color: var(--text-primary); }
133 .devdocs--wire .devdocs-code-block .tok-cmt { color: var(--text-secondary); }
134 [data-theme="light"] .devdocs--wire .devdocs-code-block :is(.tok-kw, .tok-str, .tok-num, .tok-key, .tok-fn, .tok-type, .tok-var, .tok-punc, .tok-acc) {
135 color: var(--text-primary);
136 }
137
138 // Long unbreakable tokens (sha256:<64-hex>, mpack://<mpack_key>) wrap inside callouts and cells on a phone.
139 .devdocs--wire :not(pre) > code { overflow-wrap: anywhere; }
140 .devdocs--wire .devdocs-callout > div { min-width: 0; }
141
142 // The known-issues table wraps instead of scrolling inside the page on a phone (the shared table is display:block).
143 .devdocs--wire .wireissues {
144 width: 100%;
145 table-layout: fixed;
146 display: table;
147 overflow: visible;
148
149 th, td { overflow-wrap: anywhere; vertical-align: top; }
150 th { text-transform: none; letter-spacing: normal; }
151 td:nth-child(2) { font-family: inherit; }
152 thead th:nth-child(1) { width: 28%; }
153 thead th:nth-child(3) { width: 24%; }
154 @media (max-width: 480px) { font-size: 11px; th, td { padding: 6px 3px; } }
155 }
File History 1 commit
sha256:af8b93688057d89c35730de054ab1ce0648f4c405e3ebb884729a1a8b23fcd76 docs(wire): #254 Wire Protocol QA contract v2 (replay of c0… Opus 5.5 minor ⚠ 9 days ago