gabriel / musehub public
_merge-docs.scss
191 lines 6.6 KB
Raw
sha256:0914c802f6e5260fd54b28ecfb013b7815a76983780d5d2f854ef46c3ed36ab8 docs(merge): #249 Merge Engine QA contract v2 — correct /mu… Sonnet 5.5 minor ⚠ breaking 9 days ago
1 // ── Merge routing figure (musehub#249 V1) ─────────────────────────────────────
2 // Used only by /muse/merge inside the shared docs figure (.docfig, musehub#242 W7). An ordered list
3 // of the decisions `muse merge` makes, then a route table with one row per option set. Server-rendered
4 // and readable in DOM order without script, so the figure is its own text alternative. No motion.
5 // Theme tokens only. Accent and status tokens never colour text: on the light theme they are below
6 // WCAG AA as text (musehub#283), so text stays on --text-primary/--text-secondary and the accent only
7 // draws outlines. Doubled .docfig class: the page's paragraph rules are more specific.
8
9 .mrgfig {
10 display: grid;
11 gap: var(--space-4);
12 font-size: 13px;
13 color: var(--text-primary);
14 }
15
16 .mrgfig__steps {
17 list-style: none;
18 margin: 0;
19 padding: 0;
20 display: grid;
21 gap: var(--space-2);
22 }
23
24 .mrgfig__step {
25 min-width: 0;
26 padding: var(--space-2) var(--space-3);
27 border: 1px solid var(--border-default);
28 border-left: 3px solid var(--color-accent);
29 border-radius: 6px;
30 background: var(--bg-surface);
31 }
32
33 .docfig .mrgfig__q,
34 .docfig .mrgfig__a,
35 .docfig .mrgfig__note {
36 margin: 0;
37 font-size: 12px;
38 line-height: 1.55;
39 color: var(--text-primary);
40 overflow-wrap: anywhere;
41 }
42
43 .docfig .mrgfig__q { display: flex; gap: var(--space-2); align-items: baseline; font-weight: 600; }
44 .docfig .mrgfig__a { margin-top: var(--space-1); }
45 .docfig .mrgfig__note { margin-top: var(--space-1); color: var(--text-secondary); }
46
47 .mrgfig__num { // outlined badge: AA in both themes (a filled accent badge with base text is not)
48 flex: none;
49 display: inline-grid;
50 place-items: center;
51 min-width: 20px;
52 height: 20px;
53 padding: 0 4px;
54 border: 1.5px solid var(--color-accent);
55 border-radius: 10px;
56 background: var(--bg-surface);
57 color: var(--text-primary);
58 font-family: var(--font-mono);
59 font-size: 11px;
60 font-weight: 700;
61 }
62
63 .mrgfig__table { // fixed columns that wrap, never a scrolling table: fits 320 px
64 width: 100%;
65 border-collapse: collapse;
66 table-layout: fixed;
67 font-size: 12px;
68
69 caption {
70 caption-side: top;
71 padding-bottom: var(--space-2);
72 text-align: left;
73 font-size: 13px;
74 color: var(--text-secondary);
75 }
76
77 th,
78 td {
79 padding: 6px 8px;
80 border-bottom: 1px solid var(--border-subtle);
81 text-align: left;
82 vertical-align: top;
83 line-height: 1.5;
84 color: var(--text-primary);
85 overflow-wrap: anywhere;
86 }
87
88 // The generic th style uppercases text, which would rewrite the flags: reset it.
89 th { letter-spacing: normal; text-transform: none; }
90 thead th { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
91 tbody th { font-weight: 400; }
92 thead th:nth-child(1) { width: 36%; }
93 thead th:nth-child(2) { width: 21%; white-space: nowrap; }
94
95 @media (max-width: 480px) {
96 font-size: 11px;
97 th, td { padding: 6px 3px; overflow-wrap: break-word; }
98 code { font-size: 10px; }
99 }
100 }
101
102 .mrgfig__flags { display: inline-block; margin-top: 2px; font-weight: 400; color: var(--text-secondary); }
103 .mrgfig .sr-label { // read by screen readers, not shown: the column header already says it
104 position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
105 }
106
107 .mrgfig__yes { font-weight: 700; box-shadow: inset 3px 0 0 var(--color-success); }
108 .mrgfig__no { color: var(--text-secondary); }
109
110 .docfig .mrgfig code,
111 .docfig .mrgfig p code {
112 padding: 0 4px;
113 border: 1px solid var(--border-default);
114 border-radius: 4px;
115 background: var(--bg-overlay);
116 color: var(--text-primary);
117 font-family: var(--font-mono);
118 font-size: 11px;
119 white-space: normal;
120 overflow-wrap: anywhere;
121 }
122
123 .docfig .mrgfig a,
124 .docfig .mrgfig p a {
125 color: var(--text-primary);
126 text-decoration: underline;
127 text-underline-offset: 2px;
128 &:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
129 }
130
131 @media (forced-colors: active) {
132 .mrgfig__step,
133 .mrgfig__num { border-color: CanvasText; }
134 .mrgfig__step { border-left-color: Highlight; }
135 .mrgfig__yes { box-shadow: none; text-decoration: underline; }
136 }
137
138 // The shared docs styles are below WCAG AA as text on this page (musehub#283): callout links and inline code
139 // fall back to the accent-link and purple tokens (light theme), table headers are 2.2:1 (light theme) and inline
140 // code in tables is 3.85:1 (dark theme). Scoped to this page as an interim, like the shelves page; delete when
141 // #283 fixes the tokens.
142 .devdocs--merge .devdocs-callout {
143 a {
144 color: var(--text-primary);
145 text-decoration: underline;
146 text-underline-offset: 2px;
147 &:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
148 }
149 code { color: var(--text-primary); }
150 }
151
152 .devdocs--merge .devdocs-table {
153 thead th { color: var(--text-secondary); }
154 tbody th { color: var(--text-primary); }
155 td { color: var(--text-primary); } // the shared muted second column is 2.2:1 on the light theme
156 td code { color: var(--text-primary); }
157 }
158
159 // Links in prose, lists and cells fall back to the accent-link token, 1.55:1 on the light theme (musehub#283).
160 .devdocs--merge .devdocs-section :is(p, li, td, figcaption) a {
161 color: var(--text-primary);
162 text-decoration: underline;
163 text-underline-offset: 2px;
164 &:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
165 }
166
167 // Inline code in prose and the code-block header labels fall back to the purple and muted tokens: 2.08:1 and
168 // 1.96:1 on the light theme, 3.85:1 on the dark theme (musehub#283).
169 .devdocs--merge .devdocs-section :is(p, li) code { color: var(--text-primary); }
170 .devdocs--merge .devdocs-code-block pre,
171 .devdocs--merge .devdocs-code-block pre code { color: var(--text-primary); }
172 .devdocs--merge .devdocs-code-header :is(.devdocs-code-lang, .devdocs-code-label) { color: var(--text-secondary); }
173
174 // A long unbreakable address (src/auth/tokens.py::validate_token) must wrap inside callouts and cells on a phone.
175 .devdocs--merge :not(pre) > code { overflow-wrap: anywhere; }
176 .devdocs--merge .devdocs-callout > div { min-width: 0; }
177
178 // Git <-> Muse comparison table on identical trees: wraps instead of scrolling inside the page.
179 .devdocs--merge .mrgcmp {
180 width: 100%;
181 table-layout: fixed;
182 display: table;
183 overflow: visible;
184
185 th, td { overflow-wrap: anywhere; vertical-align: top; }
186 th { text-transform: none; letter-spacing: normal; }
187 td:nth-child(2) { font-family: inherit; color: inherit; }
188 thead th:nth-child(1) { width: 12%; }
189 thead th:nth-child(3), thead th:nth-child(4) { width: 17%; }
190 @media (max-width: 480px) { font-size: 11px; th, td { padding: 6px 3px; } }
191 }
File History 1 commit
sha256:0914c802f6e5260fd54b28ecfb013b7815a76983780d5d2f854ef46c3ed36ab8 docs(merge): #249 Merge Engine QA contract v2 — correct /mu… Sonnet 5.5 minor ⚠ 9 days ago