Fossil SCM

Merged trunk in, for all the recent fixes

wyoung 2026-11-20 14:43 UTC test-suite-new merge
Commit c42ebff1ed4a16aa941e9dd75b83a5807ef56f122b6aa4582b451efa893d4e99
--- a/skins/refined-dark/css.txt
+++ b/skins/refined-dark/css.txt
@@ -0,0 +1,1013 @@
1
+/* Refined Dark skin
2
+ A dark rendering of Fossil's default skin: same layout, same sizes, same
3
+ menu band and submenu row. Colors are chosen for WCAG AA contrast on a
4
+ near-black page: body text 13:1, muted text 7:1, links 7:1.
5
+ Functional dark-theme overrides for Fossil's hardcoded light colors
6
+ (timeline graph, diffs, chat, forum, tickets) are kept at the end.
7
+ Uses system fonts; no external font resources are needed. */
8
+
9
+
10
+:root {
11
+ --bg: #1c1e22; /* page */
12
+ --surface: #272a30; /* menu band, cards, code blocks */
13
+ --surface2: #31353d; /* hover states, selected rows */
14
+ --border: #41454e;
15
+ --text: #e8e9eb; /* 13:1 on --bg */
16
+ --muted: #b3b8c0; /* 7.3:1 on --bg */
17
+ --link: #7fb6ef; /* 7.2:1 on --bg; Fossil default's #3779BF, lightened */
18
+ --link-hover: #a3cbf5;
19
+ --link-on-tint: var(--link); /* links on Fossil's colored rows */
20
+ --title: #8cbdf0; /* project title, like the default's #4183C4 */
21
+ --active: #f08a3c; /* active menu underline; default's #D26911, lightened */
22
+ --green: #6fd48f;
23
+ --red: #f08a7e;
24
+ --yellow: #f2c94c;
25
+ --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
26
+ --mono: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
27
+ color-scheme: dark;
28
+ --input-bg: #15171a; --on-accent: #0b0d10; --visited: #a6b8e8;
29
+ --sel-bg: #4a3a2a; --sec-bg: #2a3a4a; --stripe: #2b2e34; --rule: #2c2f35;
30
+ --btn-hover: #3b4049; --band-top: #2d3037; --warn-bg: #3a2f12; --err-bg: #3a2220;
31
+ --green-rgb: 111 212 143; --red-rgb: 240 138 126; --yellow-rgb: 242 201 76;
32
+ --link-rgb: 127 182 239; --teal-rgb: 79 209 197; --violet-rgb: 140 150 240;
33
+ --muted-rgb: 179 184 192; --veil-rgb: 28 30 34; --lift-rgb: 255 255 255; --shadow-rgb: 0 0 0;
34
+ --tint-rgb: 39 42 48; --tint-mute: 0.4; --chat-mute: 0.3; --bubble-shadow: 0.35; --popup-shadow: 0.5;
35
+}
36
+
37
+/* Base, matching the default skin's sizing */
38
+body {
39
+ box-sizing: border-box;
40
+ min-height: 100vh;
41
+ min-height: 100dvh;
42
+ display: flex;
43
+ flex-direction: column;
44
+ margin: 0 auto;
45
+ background-color: var(--bg);
46
+ color: var(--text);
47
+ font-family: var(--font);
48
+ font-size: 16px;
49
+ line-height: 1.45;
50
+}
51
+a { color: var(--link); text-decoration: none; }
52
+a:hover { color: var(--link-hover); text-decoration: underline; }
53
+a:visited { color: var(--visited); }
54
+code, pre, tt, kbd, samp, var { font-family: var(--mono); }
55
+code, tt, kbd, samp { font-size: 0.94em; }
56
+pre { font-size: 0.92em; line-height: 1.35; overflow-x: auto; }
57
+hr { border: none; border-top: 1px solid var(--border); }
58
+blockquote { border-left: 3px solid var(--border); margin: 0.5em 0; padding: 0.1em 1em; }
59
+img { max-width: 100%; }
60
+
61
+/* Title area above the menu bar */
62
+header { display: flex; align-items: center; gap: 14px; padding: 14px 0 12px; }
63
+.skip-nav {
64
+ position: absolute; top: -100%; left: 0;
65
+ background: var(--link); color: var(--on-accent);
66
+ padding: 0.5rem 1.25rem; font-weight: 600; z-index: 9999;
67
+ border-radius: 0 0 6px 0;
68
+}
69
+.skip-nav:focus { top: 0; outline: 2px solid #fff; outline-offset: -4px; }
70
+
71
+div.logo { display: flex; flex-shrink: 0; }
72
+div.logo img, img.logo-mark { width: 48px; height: 48px; object-fit: cover; display: block; border-radius: 6px; }
73
+.hub-link:hover img { opacity: 0.85; }
74
+
75
+.title { min-width: 0; color: var(--title); line-height: 1.2; }
76
+.title h1, .title .project-name {
77
+ display: inline;
78
+ font-size: 2.2em;
79
+ font-weight: bold;
80
+ color: var(--title);
81
+ text-decoration: none;
82
+}
83
+.title .project-name:hover { color: var(--link-hover); text-decoration: none; }
84
+.title h1:after, .title .project-name:after {
85
+ content: " / "; color: var(--muted); font-weight: normal;
86
+}
87
+span.page-title { font-size: 18px; color: var(--text); }
88
+/* Hidden from view but not display:none: Fossil's forum script sizes its
89
+ expand control from the height of the first h1 on the page, and loops
90
+ forever if that height is 0. This also keeps the heading for screen readers. */
91
+h1.page-title {
92
+ font-size: 1.6em; color: var(--text);
93
+ display: block; position: absolute; width: 1px; margin: 0; padding: 0;
94
+ overflow: hidden; clip-path: inset(50%); white-space: nowrap;
95
+}
96
+/* Home pages carry their own heading; Fossil's "index" / "Home" title is noise */
97
+h1.page-title.home-title { display: none !important; }
98
+/* Long document titles go in the body instead of the title bar */
99
+.artifact h1.page-title, .dir h1.page-title, .doc h1.page-title, .wiki h1.page-title {
100
+ position: static; width: auto; overflow: visible; clip-path: none; white-space: normal;
101
+ margin: revert; margin-bottom: 0;
102
+}
103
+.artifact .title > .page-title, .dir .title > .page-title,
104
+.doc .title > .page-title, .wiki .title > .page-title { display: none; }
105
+/* ...unless the page opens with a heading of its own (a wiki page's first
106
+ heading, "History of ...", "Files in ..."): the title would say it twice */
107
+body:has(div.content > :is(h1, h2):first-child, div.content > span:first-child + :is(h1, h2),
108
+ div.content > :is(.markdown, .fossil-doc) > :is(h1, h2):first-child,
109
+ div.content > span:first-child + :is(.markdown, .fossil-doc) > :is(h1, h2):first-child) h1.page-title {
110
+ position: absolute; width: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
111
+}
112
+.artifact .title h1:after, .dir .title h1:after, .doc .title h1:after, .wiki .title h1:after,
113
+.artifact .title .project-name:after, .dir .title .project-name:after,
114
+.doc .title .project-name:after, .wiki .title .project-name:after { content: ""; }
115
+
116
+.status { margin-left: auto; font-size: 0.9em; }
117
+.status a { color: var(--muted); }
118
+.status a:hover { color: var(--text); }
119
+
120
+/* Main menu band */
121
+.mainmenu {
122
+ clear: both;
123
+ background: var(--surface) linear-gradient(var(--band-top), var(--surface)) repeat-x;
124
+ border: 1px solid var(--border);
125
+ border-radius: 5px;
126
+ overflow-x: auto;
127
+ overflow-y: hidden;
128
+ white-space: nowrap;
129
+ z-index: 21;
130
+}
131
+.mainmenu a {
132
+ display: inline-block;
133
+ line-height: 1.4;
134
+ color: var(--muted);
135
+ text-decoration: none;
136
+ border-right: 1px solid var(--border);
137
+ font-weight: 500;
138
+}
139
+.mainmenu a.active, .mainmenu a:hover {
140
+ color: var(--text);
141
+ border-bottom: 2px solid var(--active);
142
+ text-decoration: none;
143
+}
144
+#hbbtn { font-size: 1.15em; min-width: 44px; text-align: center; }
145
+#hbbtn[aria-expanded="true"] { color: var(--text); background: var(--surface2); }
146
+
147
+/* Hamburger dropdown (hbmenu.js toggles display; a11y.js sets --nav-bottom) */
148
+nav#hbdrop {
149
+ background-color: var(--surface);
150
+ border: 1px solid var(--border);
151
+ border-top: none;
152
+ border-radius: 0 0 0.5em 0.5em;
153
+ display: none;
154
+ font-size: 0.95em;
155
+ position: fixed;
156
+ top: var(--nav-bottom, 88px);
157
+ left: 0; right: 0;
158
+ z-index: 200;
159
+ box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.5);
160
+ overflow-x: hidden;
161
+ max-height: 75vh;
162
+ overflow-y: auto;
163
+}
164
+ul#sitemap {
165
+ padding: 1.25rem 1.5rem 1.5rem;
166
+ margin: 0;
167
+ list-style: none;
168
+ column-width: 14em;
169
+ column-gap: 2.5rem;
170
+}
171
+ul#sitemap > li {
172
+ list-style: none;
173
+ margin: 0 0 1.1rem;
174
+ break-inside: avoid;
175
+}
176
+ul#sitemap > li > a {
177
+ display: inline-block;
178
+ font-size: 0.78em;
179
+ font-weight: 600;
180
+ letter-spacing: 0.06em;
181
+ text-transform: uppercase;
182
+ color: var(--muted);
183
+ padding: 0.3rem 0;
184
+}
185
+ul#sitemap > li > a:hover { color: var(--text); text-decoration: none; }
186
+ul#sitemap ul { margin: 0.15rem 0 0; padding: 0; list-style: none; }
187
+ul#sitemap ul li { list-style: none; }
188
+ul#sitemap ul li a {
189
+ display: flex; align-items: center; box-sizing: border-box; /* text stays centered at any row height */
190
+ color: var(--text);
191
+ padding: 0.3rem 0.6rem;
192
+ margin-left: -0.6rem;
193
+ border-radius: 4px;
194
+ min-height: 36px;
195
+}
196
+ul#sitemap ul li a:hover { background: var(--surface2); color: var(--link-hover); text-decoration: none; }
197
+nav#hbdrop ul#sitemap { column-width: 14em; }
198
+ul#sitemap.columns { overflow-x: hidden; }
199
+
200
+/* Submenu row, like the default: a horizontal strip under the menu band */
201
+.submenu, .sectionmenu {
202
+ font-size: 0.9em;
203
+ padding: 8px 0;
204
+ margin-bottom: 4px;
205
+ border-bottom: 1px solid var(--border);
206
+ display: flex;
207
+ flex-wrap: wrap;
208
+ align-items: center;
209
+ gap: 0.25rem 0.5rem;
210
+}
211
+.submenu a, .submenu label, .sectionmenu a {
212
+ padding: 6px 10px;
213
+ text-decoration: none;
214
+ color: var(--link);
215
+ border: 1px solid transparent;
216
+ border-radius: 5px;
217
+ white-space: nowrap;
218
+}
219
+.submenu > a:first-child { margin-left: -10px; }
220
+.submenu a:hover, .submenu label:hover, .sectionmenu a:hover {
221
+ border-color: var(--border);
222
+ background: var(--surface);
223
+ color: var(--text);
224
+ text-decoration: none;
225
+}
226
+span.submenuctrl, span.submenuctrl input, select.submenuctrl { color: var(--muted); }
227
+span.submenuctrl { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem; }
228
+.submenuckbox { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text); cursor: pointer; }
229
+.submenu select, .submenu input[type=text], .sectionmenu select, .sectionmenu input[type=text] {
230
+ width: auto;
231
+ font-size: 0.95em;
232
+ padding: 0.3em 0.5em;
233
+}
234
+.submenu select, .sectionmenu select { padding-right: 1.9em; }
235
+.section {
236
+ font-size: 1em; font-weight: bold;
237
+ background-color: var(--surface);
238
+ border: 1px solid var(--border);
239
+ border-radius: 3px 3px 0 0;
240
+ padding: 9px 10px 10px;
241
+ margin: 10px 0;
242
+}
243
+.sectionmenu {
244
+ border: 1px solid var(--border);
245
+ border-radius: 0 0 3px 3px;
246
+ border-top: 0;
247
+ margin-top: -10px;
248
+ margin-bottom: 10px;
249
+}
250
+
251
+/* Content */
252
+.content { padding: 12px 0; color: var(--text); }
253
+.content h1 { font-size: 1.60em; color: var(--text); }
254
+.content h2 { font-size: 1.45em; color: var(--text); }
255
+.content h3 { font-size: 1.15em; color: var(--text); }
256
+.content h4 { font-size: 1.05em; color: var(--text); }
257
+.content h5 { font-size: 1.00em; color: var(--text); }
258
+.content pre, table.numbered-lines > tbody > tr { hyphens: none; line-height: 1.3; }
259
+.content ul:not(.browser) > li { list-style-type: disc; }
260
+div.filetree ul li.dir, div.filetree ul li.subdir, div.filetree ul li.file { list-style-type: none; }
261
+th { text-align: left; }
262
+
263
+/* User content: wiki, embedded docs, forum posts */
264
+.markdown blockquote, p.blockquote, .sidebar {
265
+ background-color: var(--surface);
266
+ border-left: 4px solid var(--link);
267
+}
268
+div.sidebar { outline: 1em solid var(--bg); }
269
+.artifact > .content > p > code, .artifact > .content > .markdown > p > code, .artifact > .content > .fossil-doc > p > code,
270
+.dir > .content > p > code, .dir > .content > .markdown > p > code,
271
+.doc > .content > p > code, .doc > .content > .markdown > p > code, .doc > .content > .fossil-doc > p > code,
272
+.forum > .content .markdown > p > code,
273
+.wiki > .content > p > code, .wiki > .content > .markdown > p > code, .wiki > .content > .fossil-doc > p > code,
274
+.content li > code, .content td > code {
275
+ background-color: var(--surface);
276
+ border: 1px solid var(--border);
277
+ border-radius: 3px;
278
+ padding: 0 4px;
279
+}
280
+.artifact > .content > pre, .artifact > .content > .markdown > pre, .artifact > .content > .fossil-doc > pre,
281
+.dir > .content > pre, .dir > .content > .markdown > pre,
282
+.doc > .content > pre, .doc > .content > .markdown > pre, .doc > .content > .fossil-doc > pre,
283
+.forum > .content .markdown > pre,
284
+.wiki > .content > pre, .wiki > .content > .markdown > pre, .wiki > .content > .fossil-doc > pre,
285
+pre.verbatim, pre.textPlain {
286
+ background-color: var(--surface);
287
+ border: 1px solid var(--border);
288
+ border-radius: 4px;
289
+ padding: 8px 10px;
290
+}
291
+pre.verbatim { white-space: pre-wrap; }
292
+.artifact > .content table, .dir > .content table, .doc > .content table, .wiki > .content table,
293
+.forum > .content .markdown table {
294
+ background-color: var(--surface);
295
+ border: 1px solid var(--border);
296
+ border-radius: 0.5em;
297
+ border-spacing: 0;
298
+ padding: 6px;
299
+}
300
+.artifact > .content th, .dir > .content th, .doc > .content th, .wiki > .content th,
301
+.forum > .content .markdown th {
302
+ border-bottom: 1px solid var(--border);
303
+ background-color: var(--surface2);
304
+ padding: 4px 6px;
305
+}
306
+.artifact > .content tr:nth-child(odd) td, .dir > .content tr:nth-child(odd) td,
307
+.doc > .content tr:nth-child(odd) td, .wiki > .content tr:nth-child(odd) td {
308
+ background-color: var(--stripe);
309
+}
310
+.artifact > .content td, .dir > .content td, .doc > .content td, .wiki > .content td,
311
+.forum > .content .markdown td { padding: 4px 6px; }
312
+textarea.wikiedit { font-size: 1.1em; }
313
+
314
+/* Forms */
315
+input[type=text], input[type=password], input[type=email], input[type=search],
316
+input[type=number], textarea, select {
317
+ background: var(--input-bg);
318
+ border: 1px solid var(--border);
319
+ border-radius: 4px;
320
+ color: var(--text);
321
+ font-family: var(--font);
322
+ font-size: 1em;
323
+ padding: 0.35em 0.6em;
324
+}
325
+textarea { font-family: var(--mono); }
326
+select {
327
+ appearance: none;
328
+ -webkit-appearance: none;
329
+ padding-right: 2em;
330
+ line-height: 1.3;
331
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23b3b8c0' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
332
+ background-repeat: no-repeat;
333
+ background-position: right 0.6em center;
334
+ background-size: 12px;
335
+ cursor: pointer;
336
+}
337
+select:hover { border-color: var(--muted); }
338
+select option { background: var(--input-bg); color: var(--text); }
339
+input:focus, textarea:focus, select:focus { border-color: var(--link); outline: none; }
340
+input[type=submit], input[type=button], button {
341
+ background: var(--surface2);
342
+ border: 1px solid var(--border);
343
+ border-radius: 4px;
344
+ color: var(--text);
345
+ cursor: pointer;
346
+ font-family: var(--font);
347
+ font-size: 1em;
348
+ padding: 0.35em 1em;
349
+}
350
+input[type=submit]:hover, input[type=button]:hover, button:hover {
351
+ border-color: var(--muted);
352
+ background: var(--btn-hover);
353
+}
354
+input[type=submit]:disabled, input[type=button]:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; }
355
+:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
356
+.mainmenu a:focus-visible { outline-offset: -3px; }
357
+
358
+/* Let short pages fill the viewport without overlaying long content. */
359
+body > .content { flex: 1 0 auto; min-width: 0; }
360
+body > header, body > nav, body > footer { flex-shrink: 0; }
361
+
362
+/* Footer */
363
+footer {
364
+ border-top: 1px solid var(--border);
365
+ padding: 10px;
366
+ font-size: 0.85em;
367
+ margin-top: 10px;
368
+ color: var(--muted);
369
+ display: flex;
370
+ justify-content: space-between;
371
+ flex-wrap: wrap;
372
+ gap: 0.5rem;
373
+}
374
+
375
+/* Forum */
376
+.forum a:visited { color: var(--visited); }
377
+div.forumSel {
378
+ animation: 1s linear 0s sel-fade;
379
+ background-color: var(--bg);
380
+ border-left: 4px solid var(--link);
381
+}
382
+@keyframes sel-fade { from { background-color: var(--surface2); } to { background-color: var(--bg); } }
383
+.forum form input { margin: 0.5em 0; }
384
+div.forumTime, div.forumHier, div.forumHierRoot {
385
+ background: var(--surface) !important;
386
+ border: 1px solid var(--border) !important;
387
+ border-radius: 4px;
388
+ color: var(--text) !important;
389
+}
390
+div.forumTime.forumSel, div.forumHier.forumSel { border-color: var(--link) !important; }
391
+div.forumObs { opacity: 0.75; }
392
+div.forumPostBody, div.forumPostBody h1, div.forumPostBody h2, div.forumPostBody h3 { color: var(--text) !important; }
393
+.forum-post-collapser {
394
+ border-color: var(--border) !important;
395
+ background: var(--surface) !important;
396
+ color: var(--muted) !important;
397
+}
398
+.forum-post-collapser:hover { background: var(--surface2) !important; color: var(--text) !important; }
399
+div.searchForm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1em 0; }
400
+
401
+/* Tickets and reports */
402
+table.report { cursor: auto; border: 1px solid var(--border); border-radius: 0.5em; margin: 1em 0; }
403
+.report td, .report th { border: 0; font-size: 0.9em; padding: 8px 10px; }
404
+.report th { cursor: pointer; background: var(--surface); }
405
+.report thead + tbody tr:hover { background-color: var(--surface2) !important; }
406
+body.report table.report tr td { color: var(--text) !important; }
407
+body.report table.report a { color: var(--link) !important; }
408
+td.tktDspLabel { width: 70px; text-align: right; overflow: hidden; color: var(--muted) !important; }
409
+td.tktDspValue {
410
+ text-align: left; vertical-align: top;
411
+ background-color: var(--surface) !important;
412
+ border: 1px solid var(--border) !important;
413
+ color: var(--text) !important;
414
+}
415
+td.tktDspValue pre { white-space: pre-wrap; }
416
+
417
+/* Timeline */
418
+span.timelineDetail { font-size: 90%; }
419
+div.timelineDate { font-weight: bold; white-space: nowrap; color: var(--muted); }
420
+table.timelineTable { padding: 0 3px; }
421
+table.timelineTable tr { border-radius: 1em; }
422
+.timelineModernCell, .timelineColumnarCell, .timelineDetailCell { border-radius: 0.5em; }
423
+.timelineModernCell[id], .timelineColumnarCell[id], .timelineDetailCell[id] { background-color: var(--surface); }
424
+.timelineModernDetail { opacity: 1; color: var(--muted); font-size: 0.9em; }
425
+.timelineModernComment { color: var(--text); }
426
+td.timelineTime { color: var(--muted); font-family: var(--mono); font-size: 0.9em; white-space: nowrap; }
427
+span.timelineHash { font-family: var(--mono); }
428
+tr.timelineSelected, tr.timelineSecondary { background-color: unset; }
429
+tr.timelineSelected td, span.timelineSelected { background-color: var(--sel-bg) !important; }
430
+tr.timelineSecondary td, span.timelineSecondary { background-color: var(--sec-bg) !important; }
431
+tr.timelineCurrent td:first-child, tr.timelineSecondary td:first-child, tr.timelineSelected td:first-child {
432
+ border-top-left-radius: 1em; border-bottom-left-radius: 1em;
433
+}
434
+tr.timelineCurrent td:last-child, tr.timelineSecondary td:last-child, tr.timelineSelected td:last-child {
435
+ border-top-right-radius: 1em; border-bottom-right-radius: 1em;
436
+}
437
+tr.timelineCurrent td { border-top: 1px dashed var(--muted); border-bottom: 1px dashed var(--muted); }
438
+tr.timelineCurrent td:first-child { border-left: 1px dashed var(--muted); }
439
+tr.timelineCurrent td:last-child { border-right: 1px dashed var(--muted); }
440
+
441
+/* Timeline graph: Fossil hardcodes black lines and white nodes */
442
+.tl-node { background: var(--link) !important; border-color: var(--text) !important; }
443
+.tl-node.leaf:after { background: var(--bg) !important; }
444
+.tl-node.closed-leaf svg { color: var(--bg) !important; }
445
+.tl-line { background-color: var(--muted); }
446
+.tl-line.warp { background: var(--yellow) !important; }
447
+.tl-line.cherrypick.h { border-top-color: var(--muted) !important; background: transparent !important; }
448
+.tl-line.cherrypick.v, .tl-line.dotted.v { border-left-color: var(--muted) !important; background: transparent !important; }
449
+.tl-arrow.u, .tl-arrow.u.sm { border-bottom-color: var(--muted) !important; }
450
+.tl-arrow.merge.l, .tl-arrow.cherrypick.l { border-right-color: var(--muted) !important; }
451
+.tl-arrow.merge.r, .tl-arrow.cherrypick.r { border-left-color: var(--muted) !important; }
452
+.tl-arrow.warp { border-left-color: var(--yellow) !important; }
453
+/* Branch colors are pastel inline backgrounds; darken them so text stays readable */
454
+/* Branch and user tints come from Fossil, already sized for this foreground */
455
+.tl-tooltip {
456
+ background: var(--surface2) !important; color: var(--text) !important;
457
+ border-color: var(--border) !important; box-shadow: 0 4px 16px rgb(var(--shadow-rgb) / 0.5) !important;
458
+}
459
+
460
+/* Lists and tables Fossil generates */
461
+table.sortable th, table.filelistTable th, .fileage th {
462
+ text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); cursor: pointer;
463
+}
464
+table.sortable td, table.filelistTable td, .fileage td { padding: 5px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
465
+table.sortable tr:hover td, .fileage tr:hover, div.filetreeline:hover { background: var(--surface) !important; }
466
+body.branch .brlist > table > tbody > tr:hover:not(.selected) { background: var(--surface) !important; }
467
+body.branch .brlist > table > tbody > tr.selected { background: var(--surface2) !important; }
468
+.branch-name, span.tagDsp {
469
+ display: inline-block; background: var(--surface2); border: 1px solid var(--border);
470
+ border-radius: 3px; color: var(--link); font-family: var(--mono); font-size: 0.85em; padding: 0 0.3em;
471
+}
472
+
473
+/* Diffs: Fossil's built-in colors are pale pastels */
474
+table.diff { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.9em; }
475
+td.difflnc, td.difflna, td.difflnb { color: var(--muted); padding: 0 0.5em; text-align: right; user-select: none; border-right: 1px solid var(--border); }
476
+td.difftext { padding: 0 0.5em; white-space: pre; }
477
+tr.diffskip, tr.diffskip.jchunk { background: var(--surface) !important; }
478
+tr.diffskip > td.chunkctrl .jcbutton { background: var(--surface2) !important; color: var(--muted) !important; border-radius: 3px; }
479
+tr.diffskip > td.chunkctrl .jcbutton:hover { color: var(--text) !important; }
480
+td.diffmkrl, td.diffmkrr, td.diffmkru { color: var(--muted); }
481
+tr.diffadd td { background: rgb(var(--green-rgb) / 0.10); }
482
+tr.diffrm td { background: rgb(var(--red-rgb) / 0.10); }
483
+tr.diffchng td { background: rgb(var(--yellow-rgb) / 0.07); }
484
+span.diffadd { color: var(--green); }
485
+span.diffrm { color: var(--red); }
486
+span.diffchng { color: var(--yellow); }
487
+td.diffln ins, td.difftxt ins, table.diff pre > ins { background-color: rgb(var(--green-rgb) / 0.16) !important; }
488
+td.diffln del, td.difftxt del, table.diff pre > del { background-color: rgb(var(--red-rgb) / 0.16) !important; }
489
+td.difftxt del > del, table.diff pre > del > del { background-color: rgb(var(--red-rgb) / 0.32) !important; }
490
+td.difftxt ins > ins, table.diff pre > ins > ins { background-color: rgb(var(--green-rgb) / 0.32) !important; }
491
+td.difftxt del > del.edit, td.difftxt ins > ins.edit,
492
+table.diff pre > del > del.edit, table.diff pre > ins > ins.edit { background-color: rgb(var(--link-rgb) / 0.25) !important; }
493
+
494
+/* Annotate / blame: inline pastel backgrounds from Fossil JS */
495
+td.annotateDate, td.annotateUser { color: var(--muted); font-family: var(--mono); font-size: 0.85em; padding: 0 0.5em; white-space: nowrap; border-right: 1px solid var(--border); }
496
+pre span[style*="background"], li span[style*="background"] {
497
+ background-image: linear-gradient(rgb(var(--veil-rgb) / 0.7), rgb(var(--veil-rgb) / 0.7)) !important;
498
+ border-radius: 3px; padding: 0.1em 0.25em;
499
+}
500
+
501
+/* Any inline pastel background Fossil emits (ticket reports and their key,
502
+ ticket pages, annotate legends, branch lists): darken it, keep the hue */
503
+tr[style*="background-color"], td[style*="background-color"], th[style*="background-color"],
504
+span[style*="background-color"], div[style*="background-color"], p[style*="background-color"] {
505
+ background-image: linear-gradient(rgb(var(--veil-rgb) / var(--veil, 0.35)), rgb(var(--veil-rgb) / var(--veil, 0.35))) !important;
506
+ color: var(--text);
507
+}
508
+tr[style*="background-color"] a, td[style*="background-color"] a, p[style*="background-color"] a { color: var(--link); }
509
+/* @dark-only: the light skin keeps Fossil's own ticket colors */
510
+/* Fossil's standard ticket status colors, mapped to tints instead of the generic overlay:
511
+ active / review / fixed / tested / deferred / closed / key label */
512
+tr[style*="#f2dcdc" i], td[style*="#f2dcdc" i], th[style*="#f2dcdc" i] { background-image: none !important; background-color: rgb(var(--red-rgb) / 0.22) !important; }
513
+tr[style*="#e8e8bd" i], td[style*="#e8e8bd" i], th[style*="#e8e8bd" i] { background-image: none !important; background-color: rgb(var(--yellow-rgb) / 0.20) !important; }
514
+tr[style*="#e8e8e8" i], td[style*="#e8e8e8" i], th[style*="#e8e8e8" i] { background-image: none !important; background-color: rgb(var(--yellow-rgb) / 0.14) !important; }
515
+tr[style*="#cfe8bd" i], td[style*="#cfe8bd" i], th[style*="#cfe8bd" i] { background-image: none !important; background-color: rgb(var(--green-rgb) / 0.20) !important; }
516
+tr[style*="#bde5d6" i], td[style*="#bde5d6" i], th[style*="#bde5d6" i] { background-image: none !important; background-color: rgb(var(--teal-rgb) / 0.20) !important; }
517
+tr[style*="#cacae5" i], td[style*="#cacae5" i], th[style*="#cacae5" i] { background-image: none !important; background-color: rgb(var(--violet-rgb) / 0.24) !important; }
518
+tr[style*="#c8c8c8" i], td[style*="#c8c8c8" i], th[style*="#c8c8c8" i] { background-image: none !important; background-color: rgb(var(--lift-rgb) / 0.05) !important; }
519
+tr[style*="#ffffff" i], td[style*="#ffffff" i], th[style*="#ffffff" i] { background-image: none !important; background-color: transparent !important; }
520
+table.report tr[style*="background-color"]:hover td { background-image: linear-gradient(rgb(var(--lift-rgb) / 0.05), rgb(var(--lift-rgb) / 0.05)) !important; }
521
+table.report td[style*="#ffffff" i], table.report tr[style*="#ffffff" i] td { color: var(--muted); }
522
+/* @end-dark-only */
523
+p[style*="border:1px solid"] { border-color: var(--border) !important; border-radius: 4px; padding: 0.6em 0.8em; }
524
+/* Pikchr: Fossil already draws white defaults because skin-detail is white-foreground; leave diagrams alone */
525
+
526
+/* Fossil's user and branch colors, muted toward the surface so they sit with the skin */
527
+table.timelineTable td[style*="background"] {
528
+ background-image: linear-gradient(rgb(var(--tint-rgb) / var(--tint-mute)), rgb(var(--tint-rgb) / var(--tint-mute))) !important;
529
+}
530
+body.chat .message-widget-content[style*="background"] {
531
+ background-image: linear-gradient(rgb(var(--tint-rgb) / var(--chat-mute)), rgb(var(--tint-rgb) / var(--chat-mute))) !important;
532
+}
533
+body.chat .message-widget-tab[style*="background"] { background-image: none !important; }
534
+body.chat .message-widget-content { box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / var(--bubble-shadow)) !important; }
535
+
536
+/* Misc Fossil UI elements with hardcoded light colors */
537
+div.debug { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--muted) !important; padding: 0.75rem; }
538
+/* Inline debug markers, e.g. "(artifact-NNN)" on forum posts for admins: just quieter text */
539
+span.debug { background: none !important; border: none !important; padding: 0 !important; color: var(--muted) !important; font-size: 0.85em; }
540
+span.debug a { color: var(--muted); }
541
+span.debug a:hover { color: var(--link); }
542
+span.error { background: rgb(var(--yellow-rgb) / 0.18) !important; color: var(--yellow) !important; padding: 0.1em 0.25em; border-radius: 3px; }
543
+mark { background: rgb(var(--yellow-rgb) / 0.25); color: var(--text); padding: 0.1em 0.25em; border-radius: 3px; }
544
+div.sideboxTitle { color: var(--title); font-weight: 600; }
545
+div.sidebox { background: var(--surface); border: 1px solid var(--border) !important; border-radius: 4px; margin: 0 0 1em 1.5em; padding: 0.75em; }
546
+.disabled { color: var(--red); }
547
+.modpending { color: var(--yellow); }
548
+.fossil-tooltip.help-buttonlet-content { background-color: var(--surface2); color: var(--text); border: 1px solid var(--border); }
549
+.fossil-tooltip { background: var(--surface2) !important; color: var(--text) !important; border-color: var(--border) !important; }
550
+td.capsumRead { background: rgb(var(--green-rgb) / 0.15) !important; color: var(--green); }
551
+td.capsumWrite { background: rgb(var(--yellow-rgb) / 0.15) !important; color: var(--yellow); }
552
+td.capsumOff { background: rgb(var(--muted-rgb) / 0.1) !important; color: var(--muted); }
553
+table.login_out { margin: 1em 0; }
554
+td.login_out_label { color: var(--muted); padding: 0.4em 0.75em 0.4em 0; }
555
+.help-buttonlet { color: var(--link); cursor: pointer; }
556
+
557
+/* Status text Fossil colors pure red / blue / black */
558
+span.disabled, span.wikiError, span.loginError, span.tktError, span.brokenlink, span.thTrace,
559
+p.generalError, p.tktsetupError, p.xfersetupError, p.thmainError, p.reportError, blockquote.reportError,
560
+pre.th1error, span.ueditInheritDeveloper, td.tktTlOpen,
561
+div.markdown ol.footnotes > li.fn-misreference > span, div.markdown ol.footnotes > li.fn-unreferenced > code,
562
+div.markdown sup.noteref.misref, div.markdown sup.noteref.misref > a { color: var(--red) !important; }
563
+span.ueditInheritAnonymous, p.missingPriv, p.noMoreShun, p.shunned { color: var(--link) !important; }
564
+span.ueditInheritReader { color: var(--text) !important; }
565
+blockquote.reportError, p.generalError { background: rgb(var(--red-rgb) / 0.1); border: 1px solid rgb(var(--red-rgb) / 0.4); border-radius: 4px; padding: 0.6em 0.8em; }
566
+/* Fossil also puts class="error" on <body> and colors it yellow; keep the page as it is */
567
+body.error, body.warning { background: var(--bg) !important; color: var(--text) !important; }
568
+.error:not(body), .warning:not(body) { background: rgb(var(--yellow-rgb) / 0.18) !important; color: var(--yellow) !important; border-radius: 3px; padding: 0.1em 0.3em; }
569
+table.numbered-lines td.line-numbers span.selected-line { color: var(--text) !important; background-color: rgb(var(--link-rgb) / 0.22) !important; }
570
+.fossil-toast-message { background: var(--surface2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 6px !important; box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.5) !important; }
571
+.fossil-toast-message.error, .fossil-toast-message.warning { background: var(--warn-bg) !important; color: var(--yellow) !important; border-color: var(--yellow) !important; }
572
+.fossil-toast-message.error { color: var(--red) !important; border-color: var(--red) !important; background: var(--err-bg) !important; }
573
+
574
+/* Wiki / file editor tabs */
575
+.tab-container .tab-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--border); }
576
+.tab-container .tab-button {
577
+ padding: 0.4em 0.9em; border: 1px solid transparent; border-bottom: none; border-radius: 5px 5px 0 0;
578
+ background: transparent; color: var(--muted); font-family: var(--font); font-size: 0.95em; cursor: pointer; margin-bottom: -1px;
579
+}
580
+.tab-container .tab-button:hover { color: var(--text); background: var(--surface); }
581
+.tab-container .tab-button.selected { color: var(--text); background: var(--surface); border-color: var(--border); border-bottom-color: var(--surface); }
582
+#fossil-status-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-family: var(--mono); font-size: 0.85em; padding: 0.4em 0.75em; margin: 0.5em 0; }
583
+.wikiedit-options, .fileedit-options { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.5em; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 0.5em; }
584
+.wikiedit-options .input-with-label, .fileedit-options .input-with-label { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
585
+#wikiedit-tab-content textarea, #fileedit-tab-content textarea { min-height: 300px; width: 100%; }
586
+.tab-container fieldset { border: 1px solid var(--border); border-radius: 4px; }
587
+.tab-container fieldset legend { color: var(--muted); }
588
+button.wikiedit-content-reload, button.fileedit-content-reload { min-width: unset !important; max-width: unset !important; }
589
+
590
+/* Chat: Fossil sets inline pastel backgrounds per user */
591
+/* Each message keeps the user's color, which Fossil already picks for this
592
+ skin's foreground (white-foreground); only messages without one get --surface. */
593
+body.chat .message-widget-content {
594
+ background-color: var(--surface); border: 1px solid var(--border) !important;
595
+ border-radius: 6px !important; color: var(--text) !important; padding: 0.5em 0.75em !important;
596
+}
597
+body.chat .message-widget-tab { background: transparent !important; color: var(--muted) !important; border: none !important; font-size: 0.9em !important; }
598
+body.chat .message-widget-tab[style*="background"] { background-image: none !important; }
599
+body.chat .message-widget-tab .xfrom { color: var(--link) !important; font-weight: 600 !important; }
600
+body.chat #chat-input-line-wrapper { border: 1px solid var(--border) !important; border-radius: 6px !important; background: var(--input-bg) !important; }
601
+body.chat #chat-input-line-wrapper:focus-within { border-color: var(--link) !important; }
602
+body.chat .chat-input-field { border: none !important; background: transparent !important; color: var(--text) !important; font-family: var(--font) !important; font-size: 1em !important; }
603
+body.chat .cbutton { border: 1px solid var(--border) !important; background: var(--surface) !important; border-radius: 4px !important; }
604
+body.chat .cbutton:hover { background: var(--surface2) !important; }
605
+body.chat fieldset { border: 1px solid var(--border) !important; border-radius: 4px !important; background: var(--surface) !important; }
606
+body.chat .menu-entry { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
607
+body.chat .menu-entry:hover, body.chat .menu-entry.parent { background: var(--surface2) !important; }
608
+body.chat .message-widget .match { background: rgb(var(--yellow-rgb) / 0.25) !important; color: var(--text) !important; }
609
+body.chat .chat-message-popup { background: var(--surface2) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
610
+body.chat .message-widget-content img { max-width: 100% !important; border-radius: 4px !important; }
611
+
612
+/* Chat toolbar: Fossil renders the buttons as emoji; mask them with icons, keep the spans intact */
613
+body.chat #chat-buttons-wrapper > .cbutton {
614
+ position: relative !important;
615
+ font-size: 0 !important;
616
+ color: transparent !important;
617
+ min-width: 44px !important; max-width: 44px !important;
618
+ min-height: 36px !important; height: 36px !important;
619
+ background: var(--surface) !important;
620
+ border: 1px solid var(--border) !important;
621
+ border-radius: 6px !important;
622
+}
623
+body.chat #chat-buttons-wrapper > .cbutton::after {
624
+ content: ""; position: absolute; inset: 0; margin: auto;
625
+ width: 22px; height: 22px;
626
+ background-color: var(--muted);
627
+ -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
628
+}
629
+body.chat #chat-buttons-wrapper > .cbutton:hover { background: var(--surface2) !important; border-color: var(--muted) !important; }
630
+body.chat #chat-buttons-wrapper > .cbutton:hover::after { background-color: var(--text); }
631
+body.chat #chat-buttons-wrapper > #chat-button-submit { background: var(--link) !important; border-color: var(--link) !important; min-width: 64px !important; max-width: 64px !important; }
632
+body.chat #chat-buttons-wrapper > #chat-button-submit::after { background-color: var(--on-accent); }
633
+body.chat #chat-buttons-wrapper > #chat-button-submit:hover { background: var(--link-hover) !important; }
634
+body.chat #chat-button-preview { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z%22/%3E%3C/svg%3E"); }
635
+body.chat #chat-button-search { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z%22/%3E%3C/svg%3E"); }
636
+body.chat #chat-button-attach { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z%22/%3E%3C/svg%3E"); }
637
+body.chat #chat-button-settings { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z%22/%3E%3C/svg%3E"); }
638
+body.chat #chat-button-submit { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z%22/%3E%3C/svg%3E"); }
639
+
640
+/* Screen sizes, as in the default skin */
641
+@media screen and (max-width: 600px) {
642
+ body { padding-left: 12px; padding-right: 12px; }
643
+ .content { font-size: 0.95em; }
644
+ header { gap: 10px; padding: 10px 0 8px; }
645
+ div.logo img, img.logo-mark { width: 36px; height: 36px; }
646
+ .title h1, .title .project-name { font-size: 1.5em; }
647
+ .title > .page-title { display: inline; }
648
+ .artifact .title > .page-title, .dir .title > .page-title,
649
+ .doc .title > .page-title, .wiki .title > .page-title { display: none; }
650
+ .mainmenu a { padding: 10px 12px; }
651
+ .mainmenu { padding: 0; }
652
+ nav#hbdrop ul#sitemap, ul#sitemap.columns { columns: 1 !important; column-width: auto !important; }
653
+ .submenu { padding: 6px 0; }
654
+ td.timelineTime { font-size: 0.8em; }
655
+}
656
+@media screen and (min-width: 600px) {
657
+ body { padding-left: 20px; padding-right: 20px; }
658
+ .mainmenu a { padding: 12px 20px; }
659
+ .mainmenu { padding: 0; }
660
+ .content dd, .content dt, .content div, .content li, .content p, .content table { line-height: 1.45em; }
661
+ /* Fossil renders a document's title outside .content. Match its h1 inset. */
662
+ body.doc > h1.page-title {
663
+ box-sizing: border-box;
664
+ width: 100%;
665
+ margin-inline: 0;
666
+ padding-inline: 10pt;
667
+ }
668
+ .doc > .content > p, .doc > .content > .markdown > p, .doc > .content > .fossil-doc > p,
669
+ .doc > .content > ol, .doc > .content > ul, .doc > .content > .markdown > ol, .doc > .content > .markdown > ul,
670
+ .wiki > .content > p, .wiki > .content > .markdown > p, .wiki > .content > .fossil-doc > p,
671
+ .wiki > .content > ol, .wiki > .content > ul, .wiki > .content > .markdown > ol, .wiki > .content > .markdown > ul,
672
+ .artifact > .content > .markdown > p, .artifact > .content > .markdown > ol, .artifact > .content > .markdown > ul,
673
+ .doc > .content > .markdown > table, .wiki > .content > .markdown > table, .artifact > .content > .markdown > table {
674
+ margin-left: 30pt; margin-right: 30pt;
675
+ }
676
+ .doc > .content > pre, .doc > .content > .markdown > pre, .doc > .content > .fossil-doc > pre,
677
+ .wiki > .content > pre, .wiki > .content > .markdown > pre,
678
+ .artifact > .content > .markdown > pre { margin-left: 40pt; margin-right: 30pt; }
679
+ .forum > .content .markdown > pre { margin-left: 20pt; }
680
+ .doc > .content h1, .wiki .content h1, .artifact .content h1 { margin-left: 10pt; }
681
+ .doc > .content h2, .wiki .content h2, .artifact .content h2 { margin-left: 15pt; }
682
+ .doc > .content h3, .wiki .content h3, .artifact .content h3 { margin-left: 20pt; }
683
+ .doc > .content > blockquote, .wiki > .content > blockquote { margin-left: 50pt; }
684
+ .doc > .content > .markdown > blockquote, .wiki > .content > .markdown > blockquote { margin-left: 40pt; }
685
+ .content .pikchr-wrapper, div.pikchr-wrapper.indent:not(.source) { margin-left: 40pt; }
686
+ div.pikchr-wrapper.center:not(.source), div.pikchr-wrapper.float-right:not(.source) { margin-left: 0; }
687
+}
688
+
689
+/* Chat bubbles: messaging-app corners; your own messages, when Fossil puts
690
+ them on the right (its my-messages-right layout, the default in tall
691
+ windows), point the other way */
692
+body.chat .message-widget:not(.notification) .message-widget-content { border-radius: 12px 12px 12px 4px !important; }
693
+body.chat.my-messages-right .message-widget.mine .message-widget-content { border-radius: 12px 12px 4px 12px !important; }
694
+body.chat.my-messages-right .message-widget.mine .message-widget-tab { text-align: right; }
695
+
696
+/* Message options popup (click a message's header): one card, quiet
697
+ timestamps, buttons sized for touch */
698
+body.chat .chat-message-popup {
699
+ font-family: var(--font) !important; font-size: 0.9em !important;
700
+ background: var(--surface2) !important; border: 1px solid var(--border) !important;
701
+ border-radius: 10px !important; padding: 0.65em !important; gap: 0.45em;
702
+ box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / var(--popup-shadow)) !important;
703
+ max-width: min(26rem, calc(100vw - 2rem));
704
+}
705
+body.chat .chat-message-popup > span { font-family: var(--mono); font-size: 0.85em; color: var(--muted); white-space: normal; }
706
+body.chat .chat-message-popup > .toolbar { border: none !important; gap: 0.4em; margin: 0 !important; flex-wrap: wrap; }
707
+body.chat .chat-message-popup > .toolbar > * { margin: 0 !important; }
708
+body.chat .chat-message-popup > .toolbar > button,
709
+body.chat .chat-message-popup > .toolbar > a {
710
+ flex: 1 1 auto; min-height: 36px; display: inline-flex; align-items: center; justify-content: center;
711
+ padding: 0.35em 0.8em; border: 1px solid var(--border); border-radius: 6px;
712
+ background: var(--surface); color: var(--text); font-family: var(--font); font-size: 1em; text-decoration: none;
713
+}
714
+body.chat .chat-message-popup > .toolbar > a { color: var(--link); }
715
+body.chat .chat-message-popup > .toolbar > button:hover,
716
+body.chat .chat-message-popup > .toolbar > a:hover { background: var(--btn-hover); border-color: var(--muted); text-decoration: none; }
717
+/* "Delete globally" removes the message for everyone */
718
+body.chat .chat-message-popup > div.toolbar:nth-of-type(1) > button:nth-child(2) { color: var(--red); }
719
+@media (pointer: coarse), (max-width: 600px) {
720
+ body.chat .chat-message-popup > .toolbar > button,
721
+ body.chat .chat-message-popup > .toolbar > a { min-height: 44px; }
722
+}
723
+
724
+/* Phones: the page itself never scrolls sideways */
725
+body.chat .chat-message-popup { z-index: 200 !important; }
726
+@media screen and (max-width: 600px) {
727
+ table.label-value td { white-space: normal !important; overflow-wrap: anywhere; }
728
+ table.label-value td .nobr, table.label-value td .nobr *,
729
+ td.tktDspValue .nobr, td.tktDspValue .nobr * { white-space: normal !important; word-break: break-all; }
730
+ .content table.sortable, .content table.report, .content table.userTable {
731
+ display: block; max-width: 100%; overflow-x: auto;
732
+ }
733
+ .title h1, .title .project-name { font-size: 1.3em; }
734
+}
735
+
736
+/* Hamburger menu. hbmenu.js toggles it instantly (data-anim-ms="0" in the
737
+ header); the skin slides it in. */
738
+@keyframes hb-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
739
+nav#hbdrop { animation: hb-in 160ms ease-out; top: var(--nav-bottom, 88px); }
740
+@media screen and (max-width: 600px), (pointer: coarse) {
741
+ /* A sheet from under the nav bar to the bottom of the screen, scrolling
742
+ on its own, with the page behind it held still */
743
+ nav#hbdrop {
744
+ bottom: 0; max-height: none; border-radius: 0; border-left: 0; border-right: 0;
745
+ overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
746
+ }
747
+ html:has(#hbdrop[style*="display: block"]) { overflow: hidden; }
748
+ /* Keep the nav bar, and its close button, on screen while the menu is open */
749
+ html:has(#hbdrop[style*="display: block"]) nav.mainmenu { position: sticky; top: 0; }
750
+ ul#sitemap ul li a { min-height: 44px; display: flex; align-items: center; }
751
+}
752
+@media (prefers-reduced-motion: reduce) { nav#hbdrop { animation: none; } }
753
+
754
+/* Menu bar: every item carries the 2px underline slot, transparent until
755
+ hover or active, so highlighting never changes any item's or the bar's height */
756
+.mainmenu a { border-bottom: 2px solid transparent; }
757
+.mainmenu a.active, .mainmenu a:hover { border-bottom-color: var(--active); }
758
+#hbbtn { line-height: 1.4; font-size: 1em; }
759
+
760
+/* Logo: show any repository's logo whole in the same 48px box (36px on
761
+ phones); a square logo looks exactly as before */
762
+div.logo img, img.logo-mark { object-fit: contain; }
763
+
764
+/* Menu bar as a flex row: the whitespace between items in the header no
765
+ longer leaves 4px gaps, so each underline meets the divider beside it */
766
+.mainmenu { display: flex; }
767
+.mainmenu a { flex: 0 0 auto; }
768
+
769
+/* Weekday above each timeline date. The line is reserved here, before any
770
+ script runs, so the rows already have their final height when Fossil
771
+ draws the timeline graph; a11y.js only fills in the name through
772
+ data-dow. (Inserting a line afterwards moved every row, and Fossil
773
+ redrew the graph a second later, so the nodes jumped.) */
774
+div.timelineDate::before {
775
+ content: attr(data-dow); display: block; min-height: 1.2em;
776
+ font-size: 0.8em; font-weight: 400; opacity: 0.85; line-height: 1.2; margin-bottom: 0.1em;
777
+}
778
+
779
+
780
+/* The chat's "Load..." bar: a small label over one row of buttons, without
781
+ the box Fossil's fieldset would draw around them */
782
+body.chat fieldset#load-msg-toolbar {
783
+ border: none !important; background: transparent !important;
784
+ padding: 0.5em 0 0 !important; margin: 0 0 1em !important;
785
+}
786
+body.chat #load-msg-toolbar > legend { font-size: 0.85em; color: var(--muted); padding: 0 0 0.35em; }
787
+body.chat #load-msg-toolbar > div { gap: 0.5em; }
788
+body.chat #load-msg-toolbar > div > button { border-radius: 6px; }
789
+
790
+
791
+/* ── Fixes from the page-by-page audit ─────────────────────────────────── */
792
+
793
+/* Fields Fossil emits with no type, or type="input" (forum title, ticket
794
+ e-mail), which the input[type=text] rule above does not match */
795
+input:not([type]), input[type=input] {
796
+ background: var(--input-bg); border: 1px solid var(--border); border-radius: 4px;
797
+ color: var(--text); font-family: var(--font); font-size: 1em; padding: 0.35em 0.6em;
798
+}
799
+input[type=file]::file-selector-button {
800
+ background: var(--surface2); border: 1px solid var(--border); border-radius: 4px;
801
+ color: var(--text); font-family: var(--font); font-size: 0.95em; padding: 0.35em 0.8em;
802
+ margin-right: 0.6em; cursor: pointer;
803
+}
804
+input[type=file]::file-selector-button:hover { background: var(--btn-hover); border-color: var(--muted); }
805
+
806
+/* Forum subjects may shrink below a long word on narrow screens. */
807
+@media screen and (max-width: 600px) {
808
+ body.forum td.subject { overflow-wrap: anywhere; }
809
+}
810
+
811
+/* Long hashes in titles and headings wrap instead of widening the page */
812
+.title, span.page-title, .content h1, .content h2, .content h3 { overflow-wrap: anywhere; }
813
+.title { min-width: 0; }
814
+.content :not(pre) > code { overflow-wrap: break-word; }
815
+.markdown p, .markdown li { overflow-wrap: break-word; }
816
+
817
+/* Rendered markdown looks the same wherever it appears (the wiki editor's
818
+ preview nests it deeper than the page does) */
819
+.markdown pre {
820
+ background-color: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px;
821
+}
822
+.markdown p > code, .markdown li > code, .markdown td > code {
823
+ background-color: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px;
824
+}
825
+
826
+/* Chat: a bubble holding an attachment stays inside its column */
827
+body.chat .message-widget-content { box-sizing: border-box; max-width: 100%; }
828
+body.chat .chat-message-popup > .toolbar { align-items: stretch; }
829
+body.chat .chat-message-popup > .toolbar > a { display: inline-flex; align-items: center; }
830
+
831
+/* Activity-report charts: a11y.js gives them a viewBox so they can shrink */
832
+.content svg.fit { max-width: 100%; height: auto; }
833
+
834
+/* Contrast: links on Fossil's colored rows, closed tickets in the timeline,
835
+ the fourth capability marker */
836
+body.report table.report tr[style*="background-color"] a,
837
+table.timelineTable td[style*="background"] a { color: var(--link-on-tint) !important; }
838
+td.tktTlClosed { color: var(--muted); }
839
+span.ueditInheritNobody { color: var(--green) !important; }
840
+
841
+/* Ticket view: a label alone in its row ("Description:") sits at the left,
842
+ like "User Comments:" below it */
843
+td.tktDspLabel:only-child { text-align: left; }
844
+
845
+/* Bare <table border="1"> (user categories, unversioned files) */
846
+.content table[border="1"] { border-collapse: collapse; border-color: var(--border); }
847
+.content table[border="1"] > * > tr > td, .content table[border="1"] > * > tr > th { border: 1px solid var(--border); padding: 4px 8px; }
848
+
849
+/* Lists Fossil marks list-style:none keep no bullets */
850
+.content ul[style*="list-style"] > li { list-style-type: inherit; }
851
+
852
+/* Main menu: the full bar on every screen. The menu button stays pinned at
853
+ the left while the entries scroll sideways beneath it, and a fade at the
854
+ right edge shows there is more. (Fossil would hide entries marked
855
+ desktoponly / wideonly on small screens; the display set on ".mainmenu a"
856
+ above keeps them, on purpose.) */
857
+#hbbtn {
858
+ position: sticky; left: 0; z-index: 2;
859
+ background: var(--surface) linear-gradient(var(--band-top), var(--surface));
860
+}
861
+.mainmenu::after {
862
+ content: ""; flex: 0 0 28px; position: sticky; right: 0; pointer-events: none;
863
+ background: var(--surface) linear-gradient(var(--band-top), var(--surface));
864
+ -webkit-mask-image: linear-gradient(to right, transparent, #000 85%); mask-image: linear-gradient(to right, transparent, #000 85%);
865
+}
866
+
867
+/* Phone menu sheet: top-level entries are destinations, so they read as
868
+ links in 44px rows */
869
+@media screen and (max-width: 600px), (pointer: coarse) {
870
+ ul#sitemap { padding: 0.5rem 1rem 1.5rem; }
871
+ ul#sitemap > li { margin: 0; border-bottom: 1px solid var(--rule); }
872
+ ul#sitemap > li > a {
873
+ display: flex; align-items: center; min-height: 44px; box-sizing: border-box;
874
+ font-size: 1em; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text);
875
+ }
876
+ ul#sitemap ul { margin: 0 0 0.4rem; }
877
+ ul#sitemap ul li a { box-sizing: border-box; min-height: 44px; padding-left: 1rem; color: var(--link); }
878
+
879
+ /* Touch targets */
880
+ .submenu a, .submenu label, .sectionmenu a { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }
881
+ input[type=text], input[type=password], input[type=email], input[type=search], input[type=number],
882
+ input:not([type]), input[type=input], select, input[type=submit], input[type=button], button {
883
+ min-height: 44px; box-sizing: border-box;
884
+ }
885
+ input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
886
+}
887
+
888
+@media screen and (max-width: 600px) {
889
+ /* A long unbroken word in a timeline row (a mirrored e-mail address as the
890
+ login, a path in the comment) wraps instead of widening the page */
891
+ table.timelineTable td.timelineModernCell, table.timelineTable td.timelineDetailCell,
892
+ .timelineModernComment, .timelineModernDetail,
893
+ .content table.timelineTable td.timelineModernCell * { overflow-wrap: anywhere; }
894
+
895
+ /* Forms and their fields never exceed the screen */
896
+ .content form { max-width: 100%; }
897
+ .content textarea, .content input:not([type=checkbox]):not([type=radio]), .content select { max-width: 100%; box-sizing: border-box; }
898
+ body.forum .content form { display: block; }
899
+
900
+ /* Markdown tables scroll inside themselves, like sortable tables */
901
+ .content table.md-table, .markdown table { display: block; max-width: 100%; overflow-x: auto; }
902
+
903
+ /* Ticket reports: one line per row inside the scrolling table */
904
+ .content table.report td { white-space: nowrap; }
905
+ .content table.report td:last-child { white-space: normal; min-width: 12em; max-width: 18em; }
906
+
907
+ /* Tickets: Fossil's label | value tables become label above value */
908
+ body.tkt .content form > table, body.tkt .content > table[cellpadding],
909
+ body.tkt .content form > table > tbody, body.tkt .content > table[cellpadding] > tbody,
910
+ body.tkt .content form > table > tbody > tr, body.tkt .content > table[cellpadding] > tbody > tr { display: block; }
911
+ body.tkt .content form > table > tbody > tr > td, body.tkt .content > table[cellpadding] > tbody > tr > td {
912
+ display: block; width: auto; text-align: left; padding: 2px 0;
913
+ }
914
+ body.tkt .content > table[cellpadding] > tbody > tr > td.tktDspLabel { padding: 12px 0 3px; font-size: 0.9em; color: var(--muted); }
915
+ body.tkt .content > table[cellpadding] > tbody > tr > td.tktDspValue { padding: 6px 10px; border-radius: 4px; min-height: 1.4em; overflow-wrap: anywhere; }
916
+ body.tkt .content form > table > tbody > tr > td:nth-child(3) { color: var(--muted); font-size: 0.9em; }
917
+ body.tkt .content form > table > tbody > tr > td[align=right] { padding-top: 12px; color: var(--muted); }
918
+
919
+ /* File ages: age and file on one line, the check-in below */
920
+ body.fileage .content table:not(.timelineTable), body.fileage .content table:not(.timelineTable) > * { display: block; }
921
+ body.fileage .content table:not(.timelineTable) tr { display: grid; grid-template-columns: 6.5em 1fr; border-bottom: 1px solid var(--rule); }
922
+ body.fileage .content table:not(.timelineTable) td { border: 0; overflow-wrap: anywhere; }
923
+ body.fileage .content table:not(.timelineTable) td:nth-child(3), body.fileage .content table:not(.timelineTable) th:nth-child(3) {
924
+ grid-column: 1 / -1; max-width: none; padding-top: 0; color: var(--muted); font-size: 0.9em;
925
+ }
926
+
927
+ /* Admin forms: tables that hold fields stack their cells */
928
+ body.setup .content table:not(.sortable):not([border]):has(input, textarea, select),
929
+ body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody,
930
+ body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody > tr,
931
+ body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody > tr > td {
932
+ display: block; width: auto; max-width: 100%; text-align: left;
933
+ }
934
+ body.setup .content textarea { width: 100%; }
935
+ body.setup .content label { white-space: normal; }
936
+
937
+ /* Other wide admin tables scroll inside themselves; long option lists wrap */
938
+ .content table#capabilitySummary, .cpage-rcvfromlist .content > table { display: block; max-width: 100%; overflow-x: auto; }
939
+ .content tt, .cpage-secaudit0 .content li { overflow-wrap: anywhere; }
940
+
941
+ /* Forum replies: 10px a level instead of Fossil's 4ex, so deep threads keep
942
+ their shape and their width. Every level up to ten stays distinct. */
943
+ div.forumTime[style*="margin-left:"] { margin-left: 100px !important; }
944
+ div.forumTime[style*="left:4ex"] { margin-left: 10px !important; }
945
+ div.forumTime[style*="left:8ex"] { margin-left: 20px !important; }
946
+ div.forumTime[style*="left:12ex"] { margin-left: 30px !important; }
947
+ div.forumTime[style*="left:16ex"] { margin-left: 40px !important; }
948
+ div.forumTime[style*="left:20ex"] { margin-left: 50px !important; }
949
+ div.forumTime[style*="left:24ex"] { margin-left: 60px !important; }
950
+ div.forumTime[style*="left:28ex"] { margin-left: 70px !important; }
951
+ div.forumTime[style*="left:32ex"] { margin-left: 80px !important; }
952
+ div.forumTime[style*="left:36ex"] { margin-left: 90px !important; }
953
+ div.forumTime[style*="left:40ex"] { margin-left: 100px !important; }
954
+}
955
+
956
+/* Windows between phone and desktop width (a half-screen browser, a tablet):
957
+ the page never scrolls sideways there either. The same measures as on
958
+ phones, without the phone-only layout changes. */
959
+@media screen and (min-width: 601px) and (max-width: 1100px) {
960
+ table.label-value td { white-space: normal !important; overflow-wrap: anywhere; }
961
+ table.label-value td .nobr, table.label-value td .nobr *,
962
+ td.tktDspValue .nobr, td.tktDspValue .nobr * { white-space: normal !important; word-break: break-all; }
963
+ .content table.sortable, .content table.report, .content table.userTable, .content table.md-table, .markdown table,
964
+ .content table#capabilitySummary, .cpage-rcvfromlist .content > table {
965
+ display: block; max-width: 100%; overflow-x: auto;
966
+ }
967
+ .content form { max-width: 100%; }
968
+ .content textarea, .content input:not([type=checkbox]):not([type=radio]), .content select { max-width: 100%; box-sizing: border-box; }
969
+ body.forum .content form { display: block; }
970
+ .content tt, .cpage-secaudit0 .content li { overflow-wrap: anywhere; }
971
+ /* Ticket forms: label above field, as on phones */
972
+ body.tkt .content form > table, body.tkt .content form > table > tbody,
973
+ body.tkt .content form > table > tbody > tr { display: block; }
974
+ body.tkt .content form > table > tbody > tr > td { display: block; width: auto; text-align: left; padding: 2px 0; }
975
+ body.tkt .content form > table > tbody > tr > td:nth-child(3) { color: var(--muted); font-size: 0.9em; }
976
+ body.tkt .content form > table > tbody > tr > td[align=right] { padding-top: 12px; color: var(--muted); }
977
+}
978
+
979
+/* A long unbroken word in any timeline entry (a wiki page named after a
980
+ full hash, a path, an e-mail address as login) wraps at every width */
981
+.content table.timelineTable td[class$="Cell"], .content table.timelineTable td[class$="Cell"] *,
982
+.content table.timelineTable span[class*="Comment"], .content table.timelineTable span[class*="Comment"] *,
983
+.content table.timelineTable span[class*="Detail"], .content table.timelineTable span[class*="Detail"] * { overflow-wrap: anywhere; }
984
+
985
+/* Login page on phones: fields stack under their labels, and the anonymous
986
+ login's ASCII-art captcha scrolls inside its own box */
987
+@media screen and (max-width: 600px) {
988
+ table.login_out, table.login_out > tbody, table.login_out > tbody > tr,
989
+ table.login_out > tbody > tr > td { display: block; width: auto; text-align: left; }
990
+ table.login_out input[type=text], table.login_out input[type=password] { width: 100%; box-sizing: border-box; }
991
+ .content table.captcha, .content div.captcha { display: block; max-width: 100%; overflow-x: auto; }
992
+}
993
+
994
+/* Long branch names and "merged into" notes wrap instead of widening the page */
995
+body.branch .brlist > table td:first-child, body.branch .brlist > table td:last-child {
996
+ white-space: normal; overflow-wrap: anywhere;
997
+}
998
+/* Submenu drop-downs never grow wider than the screen */
999
+span.submenuctrl { max-width: 100%; min-width: 0; }
1000
+.submenu select, .sectionmenu select { max-width: 100%; min-width: 0; }
1001
+/* Long file names, search snippets, login notes and help options wrap */
1002
+ul.browser a, .content .snippet, body.rpage-search .content li,
1003
+body.login .content p, dl.helpOptions dt, dl.helpOptions dd { overflow-wrap: anywhere; }
1004
+/* Fossil sizes the file browser's columns from the longest name and keeps
1005
+ names on one line. On phones use one column and let a long name wrap. */
1006
+@media screen and (max-width: 600px) {
1007
+ .content div.columns { columns: auto 1 !important; }
1008
+ .content ul.browser { white-space: normal; }
1009
+}
1010
+
1011
+/* A message's header line (sender, number, time) may wrap. Fossil keeps it
1012
+ on one line, so a long login made the message list scroll sideways. */
1013
+body.chat div.message-widget .message-widget-tab { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
--- a/skins/refined-dark/css.txt
+++ b/skins/refined-dark/css.txt
@@ -0,0 +1,1013 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/refined-dark/css.txt
+++ b/skins/refined-dark/css.txt
@@ -0,0 +1,1013 @@
1 /* Refined Dark skin
2 A dark rendering of Fossil's default skin: same layout, same sizes, same
3 menu band and submenu row. Colors are chosen for WCAG AA contrast on a
4 near-black page: body text 13:1, muted text 7:1, links 7:1.
5 Functional dark-theme overrides for Fossil's hardcoded light colors
6 (timeline graph, diffs, chat, forum, tickets) are kept at the end.
7 Uses system fonts; no external font resources are needed. */
8
9
10 :root {
11 --bg: #1c1e22; /* page */
12 --surface: #272a30; /* menu band, cards, code blocks */
13 --surface2: #31353d; /* hover states, selected rows */
14 --border: #41454e;
15 --text: #e8e9eb; /* 13:1 on --bg */
16 --muted: #b3b8c0; /* 7.3:1 on --bg */
17 --link: #7fb6ef; /* 7.2:1 on --bg; Fossil default's #3779BF, lightened */
18 --link-hover: #a3cbf5;
19 --link-on-tint: var(--link); /* links on Fossil's colored rows */
20 --title: #8cbdf0; /* project title, like the default's #4183C4 */
21 --active: #f08a3c; /* active menu underline; default's #D26911, lightened */
22 --green: #6fd48f;
23 --red: #f08a7e;
24 --yellow: #f2c94c;
25 --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
26 --mono: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
27 color-scheme: dark;
28 --input-bg: #15171a; --on-accent: #0b0d10; --visited: #a6b8e8;
29 --sel-bg: #4a3a2a; --sec-bg: #2a3a4a; --stripe: #2b2e34; --rule: #2c2f35;
30 --btn-hover: #3b4049; --band-top: #2d3037; --warn-bg: #3a2f12; --err-bg: #3a2220;
31 --green-rgb: 111 212 143; --red-rgb: 240 138 126; --yellow-rgb: 242 201 76;
32 --link-rgb: 127 182 239; --teal-rgb: 79 209 197; --violet-rgb: 140 150 240;
33 --muted-rgb: 179 184 192; --veil-rgb: 28 30 34; --lift-rgb: 255 255 255; --shadow-rgb: 0 0 0;
34 --tint-rgb: 39 42 48; --tint-mute: 0.4; --chat-mute: 0.3; --bubble-shadow: 0.35; --popup-shadow: 0.5;
35 }
36
37 /* Base, matching the default skin's sizing */
38 body {
39 box-sizing: border-box;
40 min-height: 100vh;
41 min-height: 100dvh;
42 display: flex;
43 flex-direction: column;
44 margin: 0 auto;
45 background-color: var(--bg);
46 color: var(--text);
47 font-family: var(--font);
48 font-size: 16px;
49 line-height: 1.45;
50 }
51 a { color: var(--link); text-decoration: none; }
52 a:hover { color: var(--link-hover); text-decoration: underline; }
53 a:visited { color: var(--visited); }
54 code, pre, tt, kbd, samp, var { font-family: var(--mono); }
55 code, tt, kbd, samp { font-size: 0.94em; }
56 pre { font-size: 0.92em; line-height: 1.35; overflow-x: auto; }
57 hr { border: none; border-top: 1px solid var(--border); }
58 blockquote { border-left: 3px solid var(--border); margin: 0.5em 0; padding: 0.1em 1em; }
59 img { max-width: 100%; }
60
61 /* Title area above the menu bar */
62 header { display: flex; align-items: center; gap: 14px; padding: 14px 0 12px; }
63 .skip-nav {
64 position: absolute; top: -100%; left: 0;
65 background: var(--link); color: var(--on-accent);
66 padding: 0.5rem 1.25rem; font-weight: 600; z-index: 9999;
67 border-radius: 0 0 6px 0;
68 }
69 .skip-nav:focus { top: 0; outline: 2px solid #fff; outline-offset: -4px; }
70
71 div.logo { display: flex; flex-shrink: 0; }
72 div.logo img, img.logo-mark { width: 48px; height: 48px; object-fit: cover; display: block; border-radius: 6px; }
73 .hub-link:hover img { opacity: 0.85; }
74
75 .title { min-width: 0; color: var(--title); line-height: 1.2; }
76 .title h1, .title .project-name {
77 display: inline;
78 font-size: 2.2em;
79 font-weight: bold;
80 color: var(--title);
81 text-decoration: none;
82 }
83 .title .project-name:hover { color: var(--link-hover); text-decoration: none; }
84 .title h1:after, .title .project-name:after {
85 content: " / "; color: var(--muted); font-weight: normal;
86 }
87 span.page-title { font-size: 18px; color: var(--text); }
88 /* Hidden from view but not display:none: Fossil's forum script sizes its
89 expand control from the height of the first h1 on the page, and loops
90 forever if that height is 0. This also keeps the heading for screen readers. */
91 h1.page-title {
92 font-size: 1.6em; color: var(--text);
93 display: block; position: absolute; width: 1px; margin: 0; padding: 0;
94 overflow: hidden; clip-path: inset(50%); white-space: nowrap;
95 }
96 /* Home pages carry their own heading; Fossil's "index" / "Home" title is noise */
97 h1.page-title.home-title { display: none !important; }
98 /* Long document titles go in the body instead of the title bar */
99 .artifact h1.page-title, .dir h1.page-title, .doc h1.page-title, .wiki h1.page-title {
100 position: static; width: auto; overflow: visible; clip-path: none; white-space: normal;
101 margin: revert; margin-bottom: 0;
102 }
103 .artifact .title > .page-title, .dir .title > .page-title,
104 .doc .title > .page-title, .wiki .title > .page-title { display: none; }
105 /* ...unless the page opens with a heading of its own (a wiki page's first
106 heading, "History of ...", "Files in ..."): the title would say it twice */
107 body:has(div.content > :is(h1, h2):first-child, div.content > span:first-child + :is(h1, h2),
108 div.content > :is(.markdown, .fossil-doc) > :is(h1, h2):first-child,
109 div.content > span:first-child + :is(.markdown, .fossil-doc) > :is(h1, h2):first-child) h1.page-title {
110 position: absolute; width: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
111 }
112 .artifact .title h1:after, .dir .title h1:after, .doc .title h1:after, .wiki .title h1:after,
113 .artifact .title .project-name:after, .dir .title .project-name:after,
114 .doc .title .project-name:after, .wiki .title .project-name:after { content: ""; }
115
116 .status { margin-left: auto; font-size: 0.9em; }
117 .status a { color: var(--muted); }
118 .status a:hover { color: var(--text); }
119
120 /* Main menu band */
121 .mainmenu {
122 clear: both;
123 background: var(--surface) linear-gradient(var(--band-top), var(--surface)) repeat-x;
124 border: 1px solid var(--border);
125 border-radius: 5px;
126 overflow-x: auto;
127 overflow-y: hidden;
128 white-space: nowrap;
129 z-index: 21;
130 }
131 .mainmenu a {
132 display: inline-block;
133 line-height: 1.4;
134 color: var(--muted);
135 text-decoration: none;
136 border-right: 1px solid var(--border);
137 font-weight: 500;
138 }
139 .mainmenu a.active, .mainmenu a:hover {
140 color: var(--text);
141 border-bottom: 2px solid var(--active);
142 text-decoration: none;
143 }
144 #hbbtn { font-size: 1.15em; min-width: 44px; text-align: center; }
145 #hbbtn[aria-expanded="true"] { color: var(--text); background: var(--surface2); }
146
147 /* Hamburger dropdown (hbmenu.js toggles display; a11y.js sets --nav-bottom) */
148 nav#hbdrop {
149 background-color: var(--surface);
150 border: 1px solid var(--border);
151 border-top: none;
152 border-radius: 0 0 0.5em 0.5em;
153 display: none;
154 font-size: 0.95em;
155 position: fixed;
156 top: var(--nav-bottom, 88px);
157 left: 0; right: 0;
158 z-index: 200;
159 box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.5);
160 overflow-x: hidden;
161 max-height: 75vh;
162 overflow-y: auto;
163 }
164 ul#sitemap {
165 padding: 1.25rem 1.5rem 1.5rem;
166 margin: 0;
167 list-style: none;
168 column-width: 14em;
169 column-gap: 2.5rem;
170 }
171 ul#sitemap > li {
172 list-style: none;
173 margin: 0 0 1.1rem;
174 break-inside: avoid;
175 }
176 ul#sitemap > li > a {
177 display: inline-block;
178 font-size: 0.78em;
179 font-weight: 600;
180 letter-spacing: 0.06em;
181 text-transform: uppercase;
182 color: var(--muted);
183 padding: 0.3rem 0;
184 }
185 ul#sitemap > li > a:hover { color: var(--text); text-decoration: none; }
186 ul#sitemap ul { margin: 0.15rem 0 0; padding: 0; list-style: none; }
187 ul#sitemap ul li { list-style: none; }
188 ul#sitemap ul li a {
189 display: flex; align-items: center; box-sizing: border-box; /* text stays centered at any row height */
190 color: var(--text);
191 padding: 0.3rem 0.6rem;
192 margin-left: -0.6rem;
193 border-radius: 4px;
194 min-height: 36px;
195 }
196 ul#sitemap ul li a:hover { background: var(--surface2); color: var(--link-hover); text-decoration: none; }
197 nav#hbdrop ul#sitemap { column-width: 14em; }
198 ul#sitemap.columns { overflow-x: hidden; }
199
200 /* Submenu row, like the default: a horizontal strip under the menu band */
201 .submenu, .sectionmenu {
202 font-size: 0.9em;
203 padding: 8px 0;
204 margin-bottom: 4px;
205 border-bottom: 1px solid var(--border);
206 display: flex;
207 flex-wrap: wrap;
208 align-items: center;
209 gap: 0.25rem 0.5rem;
210 }
211 .submenu a, .submenu label, .sectionmenu a {
212 padding: 6px 10px;
213 text-decoration: none;
214 color: var(--link);
215 border: 1px solid transparent;
216 border-radius: 5px;
217 white-space: nowrap;
218 }
219 .submenu > a:first-child { margin-left: -10px; }
220 .submenu a:hover, .submenu label:hover, .sectionmenu a:hover {
221 border-color: var(--border);
222 background: var(--surface);
223 color: var(--text);
224 text-decoration: none;
225 }
226 span.submenuctrl, span.submenuctrl input, select.submenuctrl { color: var(--muted); }
227 span.submenuctrl { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem; }
228 .submenuckbox { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text); cursor: pointer; }
229 .submenu select, .submenu input[type=text], .sectionmenu select, .sectionmenu input[type=text] {
230 width: auto;
231 font-size: 0.95em;
232 padding: 0.3em 0.5em;
233 }
234 .submenu select, .sectionmenu select { padding-right: 1.9em; }
235 .section {
236 font-size: 1em; font-weight: bold;
237 background-color: var(--surface);
238 border: 1px solid var(--border);
239 border-radius: 3px 3px 0 0;
240 padding: 9px 10px 10px;
241 margin: 10px 0;
242 }
243 .sectionmenu {
244 border: 1px solid var(--border);
245 border-radius: 0 0 3px 3px;
246 border-top: 0;
247 margin-top: -10px;
248 margin-bottom: 10px;
249 }
250
251 /* Content */
252 .content { padding: 12px 0; color: var(--text); }
253 .content h1 { font-size: 1.60em; color: var(--text); }
254 .content h2 { font-size: 1.45em; color: var(--text); }
255 .content h3 { font-size: 1.15em; color: var(--text); }
256 .content h4 { font-size: 1.05em; color: var(--text); }
257 .content h5 { font-size: 1.00em; color: var(--text); }
258 .content pre, table.numbered-lines > tbody > tr { hyphens: none; line-height: 1.3; }
259 .content ul:not(.browser) > li { list-style-type: disc; }
260 div.filetree ul li.dir, div.filetree ul li.subdir, div.filetree ul li.file { list-style-type: none; }
261 th { text-align: left; }
262
263 /* User content: wiki, embedded docs, forum posts */
264 .markdown blockquote, p.blockquote, .sidebar {
265 background-color: var(--surface);
266 border-left: 4px solid var(--link);
267 }
268 div.sidebar { outline: 1em solid var(--bg); }
269 .artifact > .content > p > code, .artifact > .content > .markdown > p > code, .artifact > .content > .fossil-doc > p > code,
270 .dir > .content > p > code, .dir > .content > .markdown > p > code,
271 .doc > .content > p > code, .doc > .content > .markdown > p > code, .doc > .content > .fossil-doc > p > code,
272 .forum > .content .markdown > p > code,
273 .wiki > .content > p > code, .wiki > .content > .markdown > p > code, .wiki > .content > .fossil-doc > p > code,
274 .content li > code, .content td > code {
275 background-color: var(--surface);
276 border: 1px solid var(--border);
277 border-radius: 3px;
278 padding: 0 4px;
279 }
280 .artifact > .content > pre, .artifact > .content > .markdown > pre, .artifact > .content > .fossil-doc > pre,
281 .dir > .content > pre, .dir > .content > .markdown > pre,
282 .doc > .content > pre, .doc > .content > .markdown > pre, .doc > .content > .fossil-doc > pre,
283 .forum > .content .markdown > pre,
284 .wiki > .content > pre, .wiki > .content > .markdown > pre, .wiki > .content > .fossil-doc > pre,
285 pre.verbatim, pre.textPlain {
286 background-color: var(--surface);
287 border: 1px solid var(--border);
288 border-radius: 4px;
289 padding: 8px 10px;
290 }
291 pre.verbatim { white-space: pre-wrap; }
292 .artifact > .content table, .dir > .content table, .doc > .content table, .wiki > .content table,
293 .forum > .content .markdown table {
294 background-color: var(--surface);
295 border: 1px solid var(--border);
296 border-radius: 0.5em;
297 border-spacing: 0;
298 padding: 6px;
299 }
300 .artifact > .content th, .dir > .content th, .doc > .content th, .wiki > .content th,
301 .forum > .content .markdown th {
302 border-bottom: 1px solid var(--border);
303 background-color: var(--surface2);
304 padding: 4px 6px;
305 }
306 .artifact > .content tr:nth-child(odd) td, .dir > .content tr:nth-child(odd) td,
307 .doc > .content tr:nth-child(odd) td, .wiki > .content tr:nth-child(odd) td {
308 background-color: var(--stripe);
309 }
310 .artifact > .content td, .dir > .content td, .doc > .content td, .wiki > .content td,
311 .forum > .content .markdown td { padding: 4px 6px; }
312 textarea.wikiedit { font-size: 1.1em; }
313
314 /* Forms */
315 input[type=text], input[type=password], input[type=email], input[type=search],
316 input[type=number], textarea, select {
317 background: var(--input-bg);
318 border: 1px solid var(--border);
319 border-radius: 4px;
320 color: var(--text);
321 font-family: var(--font);
322 font-size: 1em;
323 padding: 0.35em 0.6em;
324 }
325 textarea { font-family: var(--mono); }
326 select {
327 appearance: none;
328 -webkit-appearance: none;
329 padding-right: 2em;
330 line-height: 1.3;
331 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23b3b8c0' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
332 background-repeat: no-repeat;
333 background-position: right 0.6em center;
334 background-size: 12px;
335 cursor: pointer;
336 }
337 select:hover { border-color: var(--muted); }
338 select option { background: var(--input-bg); color: var(--text); }
339 input:focus, textarea:focus, select:focus { border-color: var(--link); outline: none; }
340 input[type=submit], input[type=button], button {
341 background: var(--surface2);
342 border: 1px solid var(--border);
343 border-radius: 4px;
344 color: var(--text);
345 cursor: pointer;
346 font-family: var(--font);
347 font-size: 1em;
348 padding: 0.35em 1em;
349 }
350 input[type=submit]:hover, input[type=button]:hover, button:hover {
351 border-color: var(--muted);
352 background: var(--btn-hover);
353 }
354 input[type=submit]:disabled, input[type=button]:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; }
355 :focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
356 .mainmenu a:focus-visible { outline-offset: -3px; }
357
358 /* Let short pages fill the viewport without overlaying long content. */
359 body > .content { flex: 1 0 auto; min-width: 0; }
360 body > header, body > nav, body > footer { flex-shrink: 0; }
361
362 /* Footer */
363 footer {
364 border-top: 1px solid var(--border);
365 padding: 10px;
366 font-size: 0.85em;
367 margin-top: 10px;
368 color: var(--muted);
369 display: flex;
370 justify-content: space-between;
371 flex-wrap: wrap;
372 gap: 0.5rem;
373 }
374
375 /* Forum */
376 .forum a:visited { color: var(--visited); }
377 div.forumSel {
378 animation: 1s linear 0s sel-fade;
379 background-color: var(--bg);
380 border-left: 4px solid var(--link);
381 }
382 @keyframes sel-fade { from { background-color: var(--surface2); } to { background-color: var(--bg); } }
383 .forum form input { margin: 0.5em 0; }
384 div.forumTime, div.forumHier, div.forumHierRoot {
385 background: var(--surface) !important;
386 border: 1px solid var(--border) !important;
387 border-radius: 4px;
388 color: var(--text) !important;
389 }
390 div.forumTime.forumSel, div.forumHier.forumSel { border-color: var(--link) !important; }
391 div.forumObs { opacity: 0.75; }
392 div.forumPostBody, div.forumPostBody h1, div.forumPostBody h2, div.forumPostBody h3 { color: var(--text) !important; }
393 .forum-post-collapser {
394 border-color: var(--border) !important;
395 background: var(--surface) !important;
396 color: var(--muted) !important;
397 }
398 .forum-post-collapser:hover { background: var(--surface2) !important; color: var(--text) !important; }
399 div.searchForm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1em 0; }
400
401 /* Tickets and reports */
402 table.report { cursor: auto; border: 1px solid var(--border); border-radius: 0.5em; margin: 1em 0; }
403 .report td, .report th { border: 0; font-size: 0.9em; padding: 8px 10px; }
404 .report th { cursor: pointer; background: var(--surface); }
405 .report thead + tbody tr:hover { background-color: var(--surface2) !important; }
406 body.report table.report tr td { color: var(--text) !important; }
407 body.report table.report a { color: var(--link) !important; }
408 td.tktDspLabel { width: 70px; text-align: right; overflow: hidden; color: var(--muted) !important; }
409 td.tktDspValue {
410 text-align: left; vertical-align: top;
411 background-color: var(--surface) !important;
412 border: 1px solid var(--border) !important;
413 color: var(--text) !important;
414 }
415 td.tktDspValue pre { white-space: pre-wrap; }
416
417 /* Timeline */
418 span.timelineDetail { font-size: 90%; }
419 div.timelineDate { font-weight: bold; white-space: nowrap; color: var(--muted); }
420 table.timelineTable { padding: 0 3px; }
421 table.timelineTable tr { border-radius: 1em; }
422 .timelineModernCell, .timelineColumnarCell, .timelineDetailCell { border-radius: 0.5em; }
423 .timelineModernCell[id], .timelineColumnarCell[id], .timelineDetailCell[id] { background-color: var(--surface); }
424 .timelineModernDetail { opacity: 1; color: var(--muted); font-size: 0.9em; }
425 .timelineModernComment { color: var(--text); }
426 td.timelineTime { color: var(--muted); font-family: var(--mono); font-size: 0.9em; white-space: nowrap; }
427 span.timelineHash { font-family: var(--mono); }
428 tr.timelineSelected, tr.timelineSecondary { background-color: unset; }
429 tr.timelineSelected td, span.timelineSelected { background-color: var(--sel-bg) !important; }
430 tr.timelineSecondary td, span.timelineSecondary { background-color: var(--sec-bg) !important; }
431 tr.timelineCurrent td:first-child, tr.timelineSecondary td:first-child, tr.timelineSelected td:first-child {
432 border-top-left-radius: 1em; border-bottom-left-radius: 1em;
433 }
434 tr.timelineCurrent td:last-child, tr.timelineSecondary td:last-child, tr.timelineSelected td:last-child {
435 border-top-right-radius: 1em; border-bottom-right-radius: 1em;
436 }
437 tr.timelineCurrent td { border-top: 1px dashed var(--muted); border-bottom: 1px dashed var(--muted); }
438 tr.timelineCurrent td:first-child { border-left: 1px dashed var(--muted); }
439 tr.timelineCurrent td:last-child { border-right: 1px dashed var(--muted); }
440
441 /* Timeline graph: Fossil hardcodes black lines and white nodes */
442 .tl-node { background: var(--link) !important; border-color: var(--text) !important; }
443 .tl-node.leaf:after { background: var(--bg) !important; }
444 .tl-node.closed-leaf svg { color: var(--bg) !important; }
445 .tl-line { background-color: var(--muted); }
446 .tl-line.warp { background: var(--yellow) !important; }
447 .tl-line.cherrypick.h { border-top-color: var(--muted) !important; background: transparent !important; }
448 .tl-line.cherrypick.v, .tl-line.dotted.v { border-left-color: var(--muted) !important; background: transparent !important; }
449 .tl-arrow.u, .tl-arrow.u.sm { border-bottom-color: var(--muted) !important; }
450 .tl-arrow.merge.l, .tl-arrow.cherrypick.l { border-right-color: var(--muted) !important; }
451 .tl-arrow.merge.r, .tl-arrow.cherrypick.r { border-left-color: var(--muted) !important; }
452 .tl-arrow.warp { border-left-color: var(--yellow) !important; }
453 /* Branch colors are pastel inline backgrounds; darken them so text stays readable */
454 /* Branch and user tints come from Fossil, already sized for this foreground */
455 .tl-tooltip {
456 background: var(--surface2) !important; color: var(--text) !important;
457 border-color: var(--border) !important; box-shadow: 0 4px 16px rgb(var(--shadow-rgb) / 0.5) !important;
458 }
459
460 /* Lists and tables Fossil generates */
461 table.sortable th, table.filelistTable th, .fileage th {
462 text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); cursor: pointer;
463 }
464 table.sortable td, table.filelistTable td, .fileage td { padding: 5px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
465 table.sortable tr:hover td, .fileage tr:hover, div.filetreeline:hover { background: var(--surface) !important; }
466 body.branch .brlist > table > tbody > tr:hover:not(.selected) { background: var(--surface) !important; }
467 body.branch .brlist > table > tbody > tr.selected { background: var(--surface2) !important; }
468 .branch-name, span.tagDsp {
469 display: inline-block; background: var(--surface2); border: 1px solid var(--border);
470 border-radius: 3px; color: var(--link); font-family: var(--mono); font-size: 0.85em; padding: 0 0.3em;
471 }
472
473 /* Diffs: Fossil's built-in colors are pale pastels */
474 table.diff { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.9em; }
475 td.difflnc, td.difflna, td.difflnb { color: var(--muted); padding: 0 0.5em; text-align: right; user-select: none; border-right: 1px solid var(--border); }
476 td.difftext { padding: 0 0.5em; white-space: pre; }
477 tr.diffskip, tr.diffskip.jchunk { background: var(--surface) !important; }
478 tr.diffskip > td.chunkctrl .jcbutton { background: var(--surface2) !important; color: var(--muted) !important; border-radius: 3px; }
479 tr.diffskip > td.chunkctrl .jcbutton:hover { color: var(--text) !important; }
480 td.diffmkrl, td.diffmkrr, td.diffmkru { color: var(--muted); }
481 tr.diffadd td { background: rgb(var(--green-rgb) / 0.10); }
482 tr.diffrm td { background: rgb(var(--red-rgb) / 0.10); }
483 tr.diffchng td { background: rgb(var(--yellow-rgb) / 0.07); }
484 span.diffadd { color: var(--green); }
485 span.diffrm { color: var(--red); }
486 span.diffchng { color: var(--yellow); }
487 td.diffln ins, td.difftxt ins, table.diff pre > ins { background-color: rgb(var(--green-rgb) / 0.16) !important; }
488 td.diffln del, td.difftxt del, table.diff pre > del { background-color: rgb(var(--red-rgb) / 0.16) !important; }
489 td.difftxt del > del, table.diff pre > del > del { background-color: rgb(var(--red-rgb) / 0.32) !important; }
490 td.difftxt ins > ins, table.diff pre > ins > ins { background-color: rgb(var(--green-rgb) / 0.32) !important; }
491 td.difftxt del > del.edit, td.difftxt ins > ins.edit,
492 table.diff pre > del > del.edit, table.diff pre > ins > ins.edit { background-color: rgb(var(--link-rgb) / 0.25) !important; }
493
494 /* Annotate / blame: inline pastel backgrounds from Fossil JS */
495 td.annotateDate, td.annotateUser { color: var(--muted); font-family: var(--mono); font-size: 0.85em; padding: 0 0.5em; white-space: nowrap; border-right: 1px solid var(--border); }
496 pre span[style*="background"], li span[style*="background"] {
497 background-image: linear-gradient(rgb(var(--veil-rgb) / 0.7), rgb(var(--veil-rgb) / 0.7)) !important;
498 border-radius: 3px; padding: 0.1em 0.25em;
499 }
500
501 /* Any inline pastel background Fossil emits (ticket reports and their key,
502 ticket pages, annotate legends, branch lists): darken it, keep the hue */
503 tr[style*="background-color"], td[style*="background-color"], th[style*="background-color"],
504 span[style*="background-color"], div[style*="background-color"], p[style*="background-color"] {
505 background-image: linear-gradient(rgb(var(--veil-rgb) / var(--veil, 0.35)), rgb(var(--veil-rgb) / var(--veil, 0.35))) !important;
506 color: var(--text);
507 }
508 tr[style*="background-color"] a, td[style*="background-color"] a, p[style*="background-color"] a { color: var(--link); }
509 /* @dark-only: the light skin keeps Fossil's own ticket colors */
510 /* Fossil's standard ticket status colors, mapped to tints instead of the generic overlay:
511 active / review / fixed / tested / deferred / closed / key label */
512 tr[style*="#f2dcdc" i], td[style*="#f2dcdc" i], th[style*="#f2dcdc" i] { background-image: none !important; background-color: rgb(var(--red-rgb) / 0.22) !important; }
513 tr[style*="#e8e8bd" i], td[style*="#e8e8bd" i], th[style*="#e8e8bd" i] { background-image: none !important; background-color: rgb(var(--yellow-rgb) / 0.20) !important; }
514 tr[style*="#e8e8e8" i], td[style*="#e8e8e8" i], th[style*="#e8e8e8" i] { background-image: none !important; background-color: rgb(var(--yellow-rgb) / 0.14) !important; }
515 tr[style*="#cfe8bd" i], td[style*="#cfe8bd" i], th[style*="#cfe8bd" i] { background-image: none !important; background-color: rgb(var(--green-rgb) / 0.20) !important; }
516 tr[style*="#bde5d6" i], td[style*="#bde5d6" i], th[style*="#bde5d6" i] { background-image: none !important; background-color: rgb(var(--teal-rgb) / 0.20) !important; }
517 tr[style*="#cacae5" i], td[style*="#cacae5" i], th[style*="#cacae5" i] { background-image: none !important; background-color: rgb(var(--violet-rgb) / 0.24) !important; }
518 tr[style*="#c8c8c8" i], td[style*="#c8c8c8" i], th[style*="#c8c8c8" i] { background-image: none !important; background-color: rgb(var(--lift-rgb) / 0.05) !important; }
519 tr[style*="#ffffff" i], td[style*="#ffffff" i], th[style*="#ffffff" i] { background-image: none !important; background-color: transparent !important; }
520 table.report tr[style*="background-color"]:hover td { background-image: linear-gradient(rgb(var(--lift-rgb) / 0.05), rgb(var(--lift-rgb) / 0.05)) !important; }
521 table.report td[style*="#ffffff" i], table.report tr[style*="#ffffff" i] td { color: var(--muted); }
522 /* @end-dark-only */
523 p[style*="border:1px solid"] { border-color: var(--border) !important; border-radius: 4px; padding: 0.6em 0.8em; }
524 /* Pikchr: Fossil already draws white defaults because skin-detail is white-foreground; leave diagrams alone */
525
526 /* Fossil's user and branch colors, muted toward the surface so they sit with the skin */
527 table.timelineTable td[style*="background"] {
528 background-image: linear-gradient(rgb(var(--tint-rgb) / var(--tint-mute)), rgb(var(--tint-rgb) / var(--tint-mute))) !important;
529 }
530 body.chat .message-widget-content[style*="background"] {
531 background-image: linear-gradient(rgb(var(--tint-rgb) / var(--chat-mute)), rgb(var(--tint-rgb) / var(--chat-mute))) !important;
532 }
533 body.chat .message-widget-tab[style*="background"] { background-image: none !important; }
534 body.chat .message-widget-content { box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / var(--bubble-shadow)) !important; }
535
536 /* Misc Fossil UI elements with hardcoded light colors */
537 div.debug { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--muted) !important; padding: 0.75rem; }
538 /* Inline debug markers, e.g. "(artifact-NNN)" on forum posts for admins: just quieter text */
539 span.debug { background: none !important; border: none !important; padding: 0 !important; color: var(--muted) !important; font-size: 0.85em; }
540 span.debug a { color: var(--muted); }
541 span.debug a:hover { color: var(--link); }
542 span.error { background: rgb(var(--yellow-rgb) / 0.18) !important; color: var(--yellow) !important; padding: 0.1em 0.25em; border-radius: 3px; }
543 mark { background: rgb(var(--yellow-rgb) / 0.25); color: var(--text); padding: 0.1em 0.25em; border-radius: 3px; }
544 div.sideboxTitle { color: var(--title); font-weight: 600; }
545 div.sidebox { background: var(--surface); border: 1px solid var(--border) !important; border-radius: 4px; margin: 0 0 1em 1.5em; padding: 0.75em; }
546 .disabled { color: var(--red); }
547 .modpending { color: var(--yellow); }
548 .fossil-tooltip.help-buttonlet-content { background-color: var(--surface2); color: var(--text); border: 1px solid var(--border); }
549 .fossil-tooltip { background: var(--surface2) !important; color: var(--text) !important; border-color: var(--border) !important; }
550 td.capsumRead { background: rgb(var(--green-rgb) / 0.15) !important; color: var(--green); }
551 td.capsumWrite { background: rgb(var(--yellow-rgb) / 0.15) !important; color: var(--yellow); }
552 td.capsumOff { background: rgb(var(--muted-rgb) / 0.1) !important; color: var(--muted); }
553 table.login_out { margin: 1em 0; }
554 td.login_out_label { color: var(--muted); padding: 0.4em 0.75em 0.4em 0; }
555 .help-buttonlet { color: var(--link); cursor: pointer; }
556
557 /* Status text Fossil colors pure red / blue / black */
558 span.disabled, span.wikiError, span.loginError, span.tktError, span.brokenlink, span.thTrace,
559 p.generalError, p.tktsetupError, p.xfersetupError, p.thmainError, p.reportError, blockquote.reportError,
560 pre.th1error, span.ueditInheritDeveloper, td.tktTlOpen,
561 div.markdown ol.footnotes > li.fn-misreference > span, div.markdown ol.footnotes > li.fn-unreferenced > code,
562 div.markdown sup.noteref.misref, div.markdown sup.noteref.misref > a { color: var(--red) !important; }
563 span.ueditInheritAnonymous, p.missingPriv, p.noMoreShun, p.shunned { color: var(--link) !important; }
564 span.ueditInheritReader { color: var(--text) !important; }
565 blockquote.reportError, p.generalError { background: rgb(var(--red-rgb) / 0.1); border: 1px solid rgb(var(--red-rgb) / 0.4); border-radius: 4px; padding: 0.6em 0.8em; }
566 /* Fossil also puts class="error" on <body> and colors it yellow; keep the page as it is */
567 body.error, body.warning { background: var(--bg) !important; color: var(--text) !important; }
568 .error:not(body), .warning:not(body) { background: rgb(var(--yellow-rgb) / 0.18) !important; color: var(--yellow) !important; border-radius: 3px; padding: 0.1em 0.3em; }
569 table.numbered-lines td.line-numbers span.selected-line { color: var(--text) !important; background-color: rgb(var(--link-rgb) / 0.22) !important; }
570 .fossil-toast-message { background: var(--surface2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 6px !important; box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.5) !important; }
571 .fossil-toast-message.error, .fossil-toast-message.warning { background: var(--warn-bg) !important; color: var(--yellow) !important; border-color: var(--yellow) !important; }
572 .fossil-toast-message.error { color: var(--red) !important; border-color: var(--red) !important; background: var(--err-bg) !important; }
573
574 /* Wiki / file editor tabs */
575 .tab-container .tab-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--border); }
576 .tab-container .tab-button {
577 padding: 0.4em 0.9em; border: 1px solid transparent; border-bottom: none; border-radius: 5px 5px 0 0;
578 background: transparent; color: var(--muted); font-family: var(--font); font-size: 0.95em; cursor: pointer; margin-bottom: -1px;
579 }
580 .tab-container .tab-button:hover { color: var(--text); background: var(--surface); }
581 .tab-container .tab-button.selected { color: var(--text); background: var(--surface); border-color: var(--border); border-bottom-color: var(--surface); }
582 #fossil-status-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-family: var(--mono); font-size: 0.85em; padding: 0.4em 0.75em; margin: 0.5em 0; }
583 .wikiedit-options, .fileedit-options { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.5em; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 0.5em; }
584 .wikiedit-options .input-with-label, .fileedit-options .input-with-label { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
585 #wikiedit-tab-content textarea, #fileedit-tab-content textarea { min-height: 300px; width: 100%; }
586 .tab-container fieldset { border: 1px solid var(--border); border-radius: 4px; }
587 .tab-container fieldset legend { color: var(--muted); }
588 button.wikiedit-content-reload, button.fileedit-content-reload { min-width: unset !important; max-width: unset !important; }
589
590 /* Chat: Fossil sets inline pastel backgrounds per user */
591 /* Each message keeps the user's color, which Fossil already picks for this
592 skin's foreground (white-foreground); only messages without one get --surface. */
593 body.chat .message-widget-content {
594 background-color: var(--surface); border: 1px solid var(--border) !important;
595 border-radius: 6px !important; color: var(--text) !important; padding: 0.5em 0.75em !important;
596 }
597 body.chat .message-widget-tab { background: transparent !important; color: var(--muted) !important; border: none !important; font-size: 0.9em !important; }
598 body.chat .message-widget-tab[style*="background"] { background-image: none !important; }
599 body.chat .message-widget-tab .xfrom { color: var(--link) !important; font-weight: 600 !important; }
600 body.chat #chat-input-line-wrapper { border: 1px solid var(--border) !important; border-radius: 6px !important; background: var(--input-bg) !important; }
601 body.chat #chat-input-line-wrapper:focus-within { border-color: var(--link) !important; }
602 body.chat .chat-input-field { border: none !important; background: transparent !important; color: var(--text) !important; font-family: var(--font) !important; font-size: 1em !important; }
603 body.chat .cbutton { border: 1px solid var(--border) !important; background: var(--surface) !important; border-radius: 4px !important; }
604 body.chat .cbutton:hover { background: var(--surface2) !important; }
605 body.chat fieldset { border: 1px solid var(--border) !important; border-radius: 4px !important; background: var(--surface) !important; }
606 body.chat .menu-entry { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
607 body.chat .menu-entry:hover, body.chat .menu-entry.parent { background: var(--surface2) !important; }
608 body.chat .message-widget .match { background: rgb(var(--yellow-rgb) / 0.25) !important; color: var(--text) !important; }
609 body.chat .chat-message-popup { background: var(--surface2) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
610 body.chat .message-widget-content img { max-width: 100% !important; border-radius: 4px !important; }
611
612 /* Chat toolbar: Fossil renders the buttons as emoji; mask them with icons, keep the spans intact */
613 body.chat #chat-buttons-wrapper > .cbutton {
614 position: relative !important;
615 font-size: 0 !important;
616 color: transparent !important;
617 min-width: 44px !important; max-width: 44px !important;
618 min-height: 36px !important; height: 36px !important;
619 background: var(--surface) !important;
620 border: 1px solid var(--border) !important;
621 border-radius: 6px !important;
622 }
623 body.chat #chat-buttons-wrapper > .cbutton::after {
624 content: ""; position: absolute; inset: 0; margin: auto;
625 width: 22px; height: 22px;
626 background-color: var(--muted);
627 -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
628 }
629 body.chat #chat-buttons-wrapper > .cbutton:hover { background: var(--surface2) !important; border-color: var(--muted) !important; }
630 body.chat #chat-buttons-wrapper > .cbutton:hover::after { background-color: var(--text); }
631 body.chat #chat-buttons-wrapper > #chat-button-submit { background: var(--link) !important; border-color: var(--link) !important; min-width: 64px !important; max-width: 64px !important; }
632 body.chat #chat-buttons-wrapper > #chat-button-submit::after { background-color: var(--on-accent); }
633 body.chat #chat-buttons-wrapper > #chat-button-submit:hover { background: var(--link-hover) !important; }
634 body.chat #chat-button-preview { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z%22/%3E%3C/svg%3E"); }
635 body.chat #chat-button-search { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z%22/%3E%3C/svg%3E"); }
636 body.chat #chat-button-attach { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z%22/%3E%3C/svg%3E"); }
637 body.chat #chat-button-settings { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z%22/%3E%3C/svg%3E"); }
638 body.chat #chat-button-submit { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z%22/%3E%3C/svg%3E"); }
639
640 /* Screen sizes, as in the default skin */
641 @media screen and (max-width: 600px) {
642 body { padding-left: 12px; padding-right: 12px; }
643 .content { font-size: 0.95em; }
644 header { gap: 10px; padding: 10px 0 8px; }
645 div.logo img, img.logo-mark { width: 36px; height: 36px; }
646 .title h1, .title .project-name { font-size: 1.5em; }
647 .title > .page-title { display: inline; }
648 .artifact .title > .page-title, .dir .title > .page-title,
649 .doc .title > .page-title, .wiki .title > .page-title { display: none; }
650 .mainmenu a { padding: 10px 12px; }
651 .mainmenu { padding: 0; }
652 nav#hbdrop ul#sitemap, ul#sitemap.columns { columns: 1 !important; column-width: auto !important; }
653 .submenu { padding: 6px 0; }
654 td.timelineTime { font-size: 0.8em; }
655 }
656 @media screen and (min-width: 600px) {
657 body { padding-left: 20px; padding-right: 20px; }
658 .mainmenu a { padding: 12px 20px; }
659 .mainmenu { padding: 0; }
660 .content dd, .content dt, .content div, .content li, .content p, .content table { line-height: 1.45em; }
661 /* Fossil renders a document's title outside .content. Match its h1 inset. */
662 body.doc > h1.page-title {
663 box-sizing: border-box;
664 width: 100%;
665 margin-inline: 0;
666 padding-inline: 10pt;
667 }
668 .doc > .content > p, .doc > .content > .markdown > p, .doc > .content > .fossil-doc > p,
669 .doc > .content > ol, .doc > .content > ul, .doc > .content > .markdown > ol, .doc > .content > .markdown > ul,
670 .wiki > .content > p, .wiki > .content > .markdown > p, .wiki > .content > .fossil-doc > p,
671 .wiki > .content > ol, .wiki > .content > ul, .wiki > .content > .markdown > ol, .wiki > .content > .markdown > ul,
672 .artifact > .content > .markdown > p, .artifact > .content > .markdown > ol, .artifact > .content > .markdown > ul,
673 .doc > .content > .markdown > table, .wiki > .content > .markdown > table, .artifact > .content > .markdown > table {
674 margin-left: 30pt; margin-right: 30pt;
675 }
676 .doc > .content > pre, .doc > .content > .markdown > pre, .doc > .content > .fossil-doc > pre,
677 .wiki > .content > pre, .wiki > .content > .markdown > pre,
678 .artifact > .content > .markdown > pre { margin-left: 40pt; margin-right: 30pt; }
679 .forum > .content .markdown > pre { margin-left: 20pt; }
680 .doc > .content h1, .wiki .content h1, .artifact .content h1 { margin-left: 10pt; }
681 .doc > .content h2, .wiki .content h2, .artifact .content h2 { margin-left: 15pt; }
682 .doc > .content h3, .wiki .content h3, .artifact .content h3 { margin-left: 20pt; }
683 .doc > .content > blockquote, .wiki > .content > blockquote { margin-left: 50pt; }
684 .doc > .content > .markdown > blockquote, .wiki > .content > .markdown > blockquote { margin-left: 40pt; }
685 .content .pikchr-wrapper, div.pikchr-wrapper.indent:not(.source) { margin-left: 40pt; }
686 div.pikchr-wrapper.center:not(.source), div.pikchr-wrapper.float-right:not(.source) { margin-left: 0; }
687 }
688
689 /* Chat bubbles: messaging-app corners; your own messages, when Fossil puts
690 them on the right (its my-messages-right layout, the default in tall
691 windows), point the other way */
692 body.chat .message-widget:not(.notification) .message-widget-content { border-radius: 12px 12px 12px 4px !important; }
693 body.chat.my-messages-right .message-widget.mine .message-widget-content { border-radius: 12px 12px 4px 12px !important; }
694 body.chat.my-messages-right .message-widget.mine .message-widget-tab { text-align: right; }
695
696 /* Message options popup (click a message's header): one card, quiet
697 timestamps, buttons sized for touch */
698 body.chat .chat-message-popup {
699 font-family: var(--font) !important; font-size: 0.9em !important;
700 background: var(--surface2) !important; border: 1px solid var(--border) !important;
701 border-radius: 10px !important; padding: 0.65em !important; gap: 0.45em;
702 box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / var(--popup-shadow)) !important;
703 max-width: min(26rem, calc(100vw - 2rem));
704 }
705 body.chat .chat-message-popup > span { font-family: var(--mono); font-size: 0.85em; color: var(--muted); white-space: normal; }
706 body.chat .chat-message-popup > .toolbar { border: none !important; gap: 0.4em; margin: 0 !important; flex-wrap: wrap; }
707 body.chat .chat-message-popup > .toolbar > * { margin: 0 !important; }
708 body.chat .chat-message-popup > .toolbar > button,
709 body.chat .chat-message-popup > .toolbar > a {
710 flex: 1 1 auto; min-height: 36px; display: inline-flex; align-items: center; justify-content: center;
711 padding: 0.35em 0.8em; border: 1px solid var(--border); border-radius: 6px;
712 background: var(--surface); color: var(--text); font-family: var(--font); font-size: 1em; text-decoration: none;
713 }
714 body.chat .chat-message-popup > .toolbar > a { color: var(--link); }
715 body.chat .chat-message-popup > .toolbar > button:hover,
716 body.chat .chat-message-popup > .toolbar > a:hover { background: var(--btn-hover); border-color: var(--muted); text-decoration: none; }
717 /* "Delete globally" removes the message for everyone */
718 body.chat .chat-message-popup > div.toolbar:nth-of-type(1) > button:nth-child(2) { color: var(--red); }
719 @media (pointer: coarse), (max-width: 600px) {
720 body.chat .chat-message-popup > .toolbar > button,
721 body.chat .chat-message-popup > .toolbar > a { min-height: 44px; }
722 }
723
724 /* Phones: the page itself never scrolls sideways */
725 body.chat .chat-message-popup { z-index: 200 !important; }
726 @media screen and (max-width: 600px) {
727 table.label-value td { white-space: normal !important; overflow-wrap: anywhere; }
728 table.label-value td .nobr, table.label-value td .nobr *,
729 td.tktDspValue .nobr, td.tktDspValue .nobr * { white-space: normal !important; word-break: break-all; }
730 .content table.sortable, .content table.report, .content table.userTable {
731 display: block; max-width: 100%; overflow-x: auto;
732 }
733 .title h1, .title .project-name { font-size: 1.3em; }
734 }
735
736 /* Hamburger menu. hbmenu.js toggles it instantly (data-anim-ms="0" in the
737 header); the skin slides it in. */
738 @keyframes hb-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
739 nav#hbdrop { animation: hb-in 160ms ease-out; top: var(--nav-bottom, 88px); }
740 @media screen and (max-width: 600px), (pointer: coarse) {
741 /* A sheet from under the nav bar to the bottom of the screen, scrolling
742 on its own, with the page behind it held still */
743 nav#hbdrop {
744 bottom: 0; max-height: none; border-radius: 0; border-left: 0; border-right: 0;
745 overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
746 }
747 html:has(#hbdrop[style*="display: block"]) { overflow: hidden; }
748 /* Keep the nav bar, and its close button, on screen while the menu is open */
749 html:has(#hbdrop[style*="display: block"]) nav.mainmenu { position: sticky; top: 0; }
750 ul#sitemap ul li a { min-height: 44px; display: flex; align-items: center; }
751 }
752 @media (prefers-reduced-motion: reduce) { nav#hbdrop { animation: none; } }
753
754 /* Menu bar: every item carries the 2px underline slot, transparent until
755 hover or active, so highlighting never changes any item's or the bar's height */
756 .mainmenu a { border-bottom: 2px solid transparent; }
757 .mainmenu a.active, .mainmenu a:hover { border-bottom-color: var(--active); }
758 #hbbtn { line-height: 1.4; font-size: 1em; }
759
760 /* Logo: show any repository's logo whole in the same 48px box (36px on
761 phones); a square logo looks exactly as before */
762 div.logo img, img.logo-mark { object-fit: contain; }
763
764 /* Menu bar as a flex row: the whitespace between items in the header no
765 longer leaves 4px gaps, so each underline meets the divider beside it */
766 .mainmenu { display: flex; }
767 .mainmenu a { flex: 0 0 auto; }
768
769 /* Weekday above each timeline date. The line is reserved here, before any
770 script runs, so the rows already have their final height when Fossil
771 draws the timeline graph; a11y.js only fills in the name through
772 data-dow. (Inserting a line afterwards moved every row, and Fossil
773 redrew the graph a second later, so the nodes jumped.) */
774 div.timelineDate::before {
775 content: attr(data-dow); display: block; min-height: 1.2em;
776 font-size: 0.8em; font-weight: 400; opacity: 0.85; line-height: 1.2; margin-bottom: 0.1em;
777 }
778
779
780 /* The chat's "Load..." bar: a small label over one row of buttons, without
781 the box Fossil's fieldset would draw around them */
782 body.chat fieldset#load-msg-toolbar {
783 border: none !important; background: transparent !important;
784 padding: 0.5em 0 0 !important; margin: 0 0 1em !important;
785 }
786 body.chat #load-msg-toolbar > legend { font-size: 0.85em; color: var(--muted); padding: 0 0 0.35em; }
787 body.chat #load-msg-toolbar > div { gap: 0.5em; }
788 body.chat #load-msg-toolbar > div > button { border-radius: 6px; }
789
790
791 /* ── Fixes from the page-by-page audit ─────────────────────────────────── */
792
793 /* Fields Fossil emits with no type, or type="input" (forum title, ticket
794 e-mail), which the input[type=text] rule above does not match */
795 input:not([type]), input[type=input] {
796 background: var(--input-bg); border: 1px solid var(--border); border-radius: 4px;
797 color: var(--text); font-family: var(--font); font-size: 1em; padding: 0.35em 0.6em;
798 }
799 input[type=file]::file-selector-button {
800 background: var(--surface2); border: 1px solid var(--border); border-radius: 4px;
801 color: var(--text); font-family: var(--font); font-size: 0.95em; padding: 0.35em 0.8em;
802 margin-right: 0.6em; cursor: pointer;
803 }
804 input[type=file]::file-selector-button:hover { background: var(--btn-hover); border-color: var(--muted); }
805
806 /* Forum subjects may shrink below a long word on narrow screens. */
807 @media screen and (max-width: 600px) {
808 body.forum td.subject { overflow-wrap: anywhere; }
809 }
810
811 /* Long hashes in titles and headings wrap instead of widening the page */
812 .title, span.page-title, .content h1, .content h2, .content h3 { overflow-wrap: anywhere; }
813 .title { min-width: 0; }
814 .content :not(pre) > code { overflow-wrap: break-word; }
815 .markdown p, .markdown li { overflow-wrap: break-word; }
816
817 /* Rendered markdown looks the same wherever it appears (the wiki editor's
818 preview nests it deeper than the page does) */
819 .markdown pre {
820 background-color: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px;
821 }
822 .markdown p > code, .markdown li > code, .markdown td > code {
823 background-color: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px;
824 }
825
826 /* Chat: a bubble holding an attachment stays inside its column */
827 body.chat .message-widget-content { box-sizing: border-box; max-width: 100%; }
828 body.chat .chat-message-popup > .toolbar { align-items: stretch; }
829 body.chat .chat-message-popup > .toolbar > a { display: inline-flex; align-items: center; }
830
831 /* Activity-report charts: a11y.js gives them a viewBox so they can shrink */
832 .content svg.fit { max-width: 100%; height: auto; }
833
834 /* Contrast: links on Fossil's colored rows, closed tickets in the timeline,
835 the fourth capability marker */
836 body.report table.report tr[style*="background-color"] a,
837 table.timelineTable td[style*="background"] a { color: var(--link-on-tint) !important; }
838 td.tktTlClosed { color: var(--muted); }
839 span.ueditInheritNobody { color: var(--green) !important; }
840
841 /* Ticket view: a label alone in its row ("Description:") sits at the left,
842 like "User Comments:" below it */
843 td.tktDspLabel:only-child { text-align: left; }
844
845 /* Bare <table border="1"> (user categories, unversioned files) */
846 .content table[border="1"] { border-collapse: collapse; border-color: var(--border); }
847 .content table[border="1"] > * > tr > td, .content table[border="1"] > * > tr > th { border: 1px solid var(--border); padding: 4px 8px; }
848
849 /* Lists Fossil marks list-style:none keep no bullets */
850 .content ul[style*="list-style"] > li { list-style-type: inherit; }
851
852 /* Main menu: the full bar on every screen. The menu button stays pinned at
853 the left while the entries scroll sideways beneath it, and a fade at the
854 right edge shows there is more. (Fossil would hide entries marked
855 desktoponly / wideonly on small screens; the display set on ".mainmenu a"
856 above keeps them, on purpose.) */
857 #hbbtn {
858 position: sticky; left: 0; z-index: 2;
859 background: var(--surface) linear-gradient(var(--band-top), var(--surface));
860 }
861 .mainmenu::after {
862 content: ""; flex: 0 0 28px; position: sticky; right: 0; pointer-events: none;
863 background: var(--surface) linear-gradient(var(--band-top), var(--surface));
864 -webkit-mask-image: linear-gradient(to right, transparent, #000 85%); mask-image: linear-gradient(to right, transparent, #000 85%);
865 }
866
867 /* Phone menu sheet: top-level entries are destinations, so they read as
868 links in 44px rows */
869 @media screen and (max-width: 600px), (pointer: coarse) {
870 ul#sitemap { padding: 0.5rem 1rem 1.5rem; }
871 ul#sitemap > li { margin: 0; border-bottom: 1px solid var(--rule); }
872 ul#sitemap > li > a {
873 display: flex; align-items: center; min-height: 44px; box-sizing: border-box;
874 font-size: 1em; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text);
875 }
876 ul#sitemap ul { margin: 0 0 0.4rem; }
877 ul#sitemap ul li a { box-sizing: border-box; min-height: 44px; padding-left: 1rem; color: var(--link); }
878
879 /* Touch targets */
880 .submenu a, .submenu label, .sectionmenu a { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }
881 input[type=text], input[type=password], input[type=email], input[type=search], input[type=number],
882 input:not([type]), input[type=input], select, input[type=submit], input[type=button], button {
883 min-height: 44px; box-sizing: border-box;
884 }
885 input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
886 }
887
888 @media screen and (max-width: 600px) {
889 /* A long unbroken word in a timeline row (a mirrored e-mail address as the
890 login, a path in the comment) wraps instead of widening the page */
891 table.timelineTable td.timelineModernCell, table.timelineTable td.timelineDetailCell,
892 .timelineModernComment, .timelineModernDetail,
893 .content table.timelineTable td.timelineModernCell * { overflow-wrap: anywhere; }
894
895 /* Forms and their fields never exceed the screen */
896 .content form { max-width: 100%; }
897 .content textarea, .content input:not([type=checkbox]):not([type=radio]), .content select { max-width: 100%; box-sizing: border-box; }
898 body.forum .content form { display: block; }
899
900 /* Markdown tables scroll inside themselves, like sortable tables */
901 .content table.md-table, .markdown table { display: block; max-width: 100%; overflow-x: auto; }
902
903 /* Ticket reports: one line per row inside the scrolling table */
904 .content table.report td { white-space: nowrap; }
905 .content table.report td:last-child { white-space: normal; min-width: 12em; max-width: 18em; }
906
907 /* Tickets: Fossil's label | value tables become label above value */
908 body.tkt .content form > table, body.tkt .content > table[cellpadding],
909 body.tkt .content form > table > tbody, body.tkt .content > table[cellpadding] > tbody,
910 body.tkt .content form > table > tbody > tr, body.tkt .content > table[cellpadding] > tbody > tr { display: block; }
911 body.tkt .content form > table > tbody > tr > td, body.tkt .content > table[cellpadding] > tbody > tr > td {
912 display: block; width: auto; text-align: left; padding: 2px 0;
913 }
914 body.tkt .content > table[cellpadding] > tbody > tr > td.tktDspLabel { padding: 12px 0 3px; font-size: 0.9em; color: var(--muted); }
915 body.tkt .content > table[cellpadding] > tbody > tr > td.tktDspValue { padding: 6px 10px; border-radius: 4px; min-height: 1.4em; overflow-wrap: anywhere; }
916 body.tkt .content form > table > tbody > tr > td:nth-child(3) { color: var(--muted); font-size: 0.9em; }
917 body.tkt .content form > table > tbody > tr > td[align=right] { padding-top: 12px; color: var(--muted); }
918
919 /* File ages: age and file on one line, the check-in below */
920 body.fileage .content table:not(.timelineTable), body.fileage .content table:not(.timelineTable) > * { display: block; }
921 body.fileage .content table:not(.timelineTable) tr { display: grid; grid-template-columns: 6.5em 1fr; border-bottom: 1px solid var(--rule); }
922 body.fileage .content table:not(.timelineTable) td { border: 0; overflow-wrap: anywhere; }
923 body.fileage .content table:not(.timelineTable) td:nth-child(3), body.fileage .content table:not(.timelineTable) th:nth-child(3) {
924 grid-column: 1 / -1; max-width: none; padding-top: 0; color: var(--muted); font-size: 0.9em;
925 }
926
927 /* Admin forms: tables that hold fields stack their cells */
928 body.setup .content table:not(.sortable):not([border]):has(input, textarea, select),
929 body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody,
930 body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody > tr,
931 body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody > tr > td {
932 display: block; width: auto; max-width: 100%; text-align: left;
933 }
934 body.setup .content textarea { width: 100%; }
935 body.setup .content label { white-space: normal; }
936
937 /* Other wide admin tables scroll inside themselves; long option lists wrap */
938 .content table#capabilitySummary, .cpage-rcvfromlist .content > table { display: block; max-width: 100%; overflow-x: auto; }
939 .content tt, .cpage-secaudit0 .content li { overflow-wrap: anywhere; }
940
941 /* Forum replies: 10px a level instead of Fossil's 4ex, so deep threads keep
942 their shape and their width. Every level up to ten stays distinct. */
943 div.forumTime[style*="margin-left:"] { margin-left: 100px !important; }
944 div.forumTime[style*="left:4ex"] { margin-left: 10px !important; }
945 div.forumTime[style*="left:8ex"] { margin-left: 20px !important; }
946 div.forumTime[style*="left:12ex"] { margin-left: 30px !important; }
947 div.forumTime[style*="left:16ex"] { margin-left: 40px !important; }
948 div.forumTime[style*="left:20ex"] { margin-left: 50px !important; }
949 div.forumTime[style*="left:24ex"] { margin-left: 60px !important; }
950 div.forumTime[style*="left:28ex"] { margin-left: 70px !important; }
951 div.forumTime[style*="left:32ex"] { margin-left: 80px !important; }
952 div.forumTime[style*="left:36ex"] { margin-left: 90px !important; }
953 div.forumTime[style*="left:40ex"] { margin-left: 100px !important; }
954 }
955
956 /* Windows between phone and desktop width (a half-screen browser, a tablet):
957 the page never scrolls sideways there either. The same measures as on
958 phones, without the phone-only layout changes. */
959 @media screen and (min-width: 601px) and (max-width: 1100px) {
960 table.label-value td { white-space: normal !important; overflow-wrap: anywhere; }
961 table.label-value td .nobr, table.label-value td .nobr *,
962 td.tktDspValue .nobr, td.tktDspValue .nobr * { white-space: normal !important; word-break: break-all; }
963 .content table.sortable, .content table.report, .content table.userTable, .content table.md-table, .markdown table,
964 .content table#capabilitySummary, .cpage-rcvfromlist .content > table {
965 display: block; max-width: 100%; overflow-x: auto;
966 }
967 .content form { max-width: 100%; }
968 .content textarea, .content input:not([type=checkbox]):not([type=radio]), .content select { max-width: 100%; box-sizing: border-box; }
969 body.forum .content form { display: block; }
970 .content tt, .cpage-secaudit0 .content li { overflow-wrap: anywhere; }
971 /* Ticket forms: label above field, as on phones */
972 body.tkt .content form > table, body.tkt .content form > table > tbody,
973 body.tkt .content form > table > tbody > tr { display: block; }
974 body.tkt .content form > table > tbody > tr > td { display: block; width: auto; text-align: left; padding: 2px 0; }
975 body.tkt .content form > table > tbody > tr > td:nth-child(3) { color: var(--muted); font-size: 0.9em; }
976 body.tkt .content form > table > tbody > tr > td[align=right] { padding-top: 12px; color: var(--muted); }
977 }
978
979 /* A long unbroken word in any timeline entry (a wiki page named after a
980 full hash, a path, an e-mail address as login) wraps at every width */
981 .content table.timelineTable td[class$="Cell"], .content table.timelineTable td[class$="Cell"] *,
982 .content table.timelineTable span[class*="Comment"], .content table.timelineTable span[class*="Comment"] *,
983 .content table.timelineTable span[class*="Detail"], .content table.timelineTable span[class*="Detail"] * { overflow-wrap: anywhere; }
984
985 /* Login page on phones: fields stack under their labels, and the anonymous
986 login's ASCII-art captcha scrolls inside its own box */
987 @media screen and (max-width: 600px) {
988 table.login_out, table.login_out > tbody, table.login_out > tbody > tr,
989 table.login_out > tbody > tr > td { display: block; width: auto; text-align: left; }
990 table.login_out input[type=text], table.login_out input[type=password] { width: 100%; box-sizing: border-box; }
991 .content table.captcha, .content div.captcha { display: block; max-width: 100%; overflow-x: auto; }
992 }
993
994 /* Long branch names and "merged into" notes wrap instead of widening the page */
995 body.branch .brlist > table td:first-child, body.branch .brlist > table td:last-child {
996 white-space: normal; overflow-wrap: anywhere;
997 }
998 /* Submenu drop-downs never grow wider than the screen */
999 span.submenuctrl { max-width: 100%; min-width: 0; }
1000 .submenu select, .sectionmenu select { max-width: 100%; min-width: 0; }
1001 /* Long file names, search snippets, login notes and help options wrap */
1002 ul.browser a, .content .snippet, body.rpage-search .content li,
1003 body.login .content p, dl.helpOptions dt, dl.helpOptions dd { overflow-wrap: anywhere; }
1004 /* Fossil sizes the file browser's columns from the longest name and keeps
1005 names on one line. On phones use one column and let a long name wrap. */
1006 @media screen and (max-width: 600px) {
1007 .content div.columns { columns: auto 1 !important; }
1008 .content ul.browser { white-space: normal; }
1009 }
1010
1011 /* A message's header line (sender, number, time) may wrap. Fossil keeps it
1012 on one line, so a long login made the message list scroll sideways. */
1013 body.chat div.message-widget .message-widget-tab { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
--- a/skins/refined-dark/details.txt
+++ b/skins/refined-dark/details.txt
@@ -0,0 +1,4 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 1
3
+timeline-color-graph-lines: 1
4
+white-foreground: 1
--- a/skins/refined-dark/details.txt
+++ b/skins/refined-dark/details.txt
@@ -0,0 +1,4 @@
 
 
 
 
--- a/skins/refined-dark/details.txt
+++ b/skins/refined-dark/details.txt
@@ -0,0 +1,4 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 1
3 timeline-color-graph-lines: 1
4 white-foreground: 1
--- a/skins/refined-dark/footer.txt
+++ b/skins/refined-dark/footer.txt
@@ -0,0 +1,7 @@
1
+<footer>
2
+ <span class="footer-project">$<project_name></span>
3
+ <span class="footer-meta">
4
+ fossil $release_version &middot;
5
+ <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s
6
+ </span>
7
+</footer>
--- a/skins/refined-dark/footer.txt
+++ b/skins/refined-dark/footer.txt
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
--- a/skins/refined-dark/footer.txt
+++ b/skins/refined-dark/footer.txt
@@ -0,0 +1,7 @@
1 <footer>
2 <span class="footer-project">$<project_name></span>
3 <span class="footer-meta">
4 fossil $release_version &middot;
5 <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s
6 </span>
7 </footer>
--- a/skins/refined-dark/header.txt
+++ b/skins/refined-dark/header.txt
@@ -0,0 +1,44 @@
1
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
2
+<script defer src="$home/script.js"></script>
3
+<a class="skip-nav" href="#main-content">Skip to content</a>
4
+<header>
5
+ <div class="title">
6
+ <a href="$home/home" class="project-name">$<project_name></a>
7
+ <span class="page-title">$<title></span>
8
+ </div>
9
+ <div class="status">
10
+ <th1>
11
+ if {[info exists login]} {
12
+ html "<a href='$home/login'>$login</a>\n"
13
+ } else {
14
+ html "<a href='$home/login'>Login</a>\n"
15
+ }
16
+ </th1>
17
+ </div>
18
+</header>
19
+<nav class="mainmenu" aria-label="Main menu">
20
+ <th1>
21
+ html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map' aria-expanded='false' aria-controls='hbdrop'>&#9776;</a>"
22
+ builtin_request_js hbmenu.js
23
+ foreach {name url expr class} $mainmenu {
24
+ if {![capexpr $expr]} continue
25
+ if {[string match /* $url]} {
26
+ if {[string match $url\[/?#\]* /$current_page/]} {
27
+ set class "active $class"
28
+ }
29
+ set url $home$url
30
+ }
31
+ html "<a href='$url' class='$class'>$name</a>\n"
32
+ }
33
+ </th1>
34
+</nav>
35
+<nav id="hbdrop" class='hbdrop' aria-label="Site map" data-anim-ms="0"></nav>
36
+<div id="main-content" tabindex="-1" style="height:0;overflow:hidden;position:absolute"></div>
37
+<th1>
38
+ if {[string compare $title index]==0 || [string compare $title Home]==0} {
39
+ html "<h1 class='page-title home-title'>[htmlize $title]</h1>\n"
40
+ } else {
41
+ html "<h1 class='page-title'>[htmlize $title]</h1>\n"
42
+ }
43
+</th1>
44
+
--- a/skins/refined-dark/header.txt
+++ b/skins/refined-dark/header.txt
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/refined-dark/header.txt
+++ b/skins/refined-dark/header.txt
@@ -0,0 +1,44 @@
1 <meta name="viewport" content="width=device-width, initial-scale=1.0">
2 <script defer src="$home/script.js"></script>
3 <a class="skip-nav" href="#main-content">Skip to content</a>
4 <header>
5 <div class="title">
6 <a href="$home/home" class="project-name">$<project_name></a>
7 <span class="page-title">$<title></span>
8 </div>
9 <div class="status">
10 <th1>
11 if {[info exists login]} {
12 html "<a href='$home/login'>$login</a>\n"
13 } else {
14 html "<a href='$home/login'>Login</a>\n"
15 }
16 </th1>
17 </div>
18 </header>
19 <nav class="mainmenu" aria-label="Main menu">
20 <th1>
21 html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map' aria-expanded='false' aria-controls='hbdrop'>&#9776;</a>"
22 builtin_request_js hbmenu.js
23 foreach {name url expr class} $mainmenu {
24 if {![capexpr $expr]} continue
25 if {[string match /* $url]} {
26 if {[string match $url\[/?#\]* /$current_page/]} {
27 set class "active $class"
28 }
29 set url $home$url
30 }
31 html "<a href='$url' class='$class'>$name</a>\n"
32 }
33 </th1>
34 </nav>
35 <nav id="hbdrop" class='hbdrop' aria-label="Site map" data-anim-ms="0"></nav>
36 <div id="main-content" tabindex="-1" style="height:0;overflow:hidden;position:absolute"></div>
37 <th1>
38 if {[string compare $title index]==0 || [string compare $title Home]==0} {
39 html "<h1 class='page-title home-title'>[htmlize $title]</h1>\n"
40 } else {
41 html "<h1 class='page-title'>[htmlize $title]</h1>\n"
42 }
43 </th1>
44
--- a/skins/refined-dark/js.txt
+++ b/skins/refined-dark/js.txt
@@ -0,0 +1,338 @@
1
+document.addEventListener('DOMContentLoaded', function () {
2
+(function () {
3
+ 'use strict';
4
+
5
+ /* ─────────────────────────────────────────────────────────────────────
6
+ 1. isDark patch
7
+ Fossil's C code hard-codes isDark:false for all custom skins,
8
+ ignoring the skin-detail config key. Patch it here after Fossil's
9
+ inline scripts have already run (guaranteed by defer).
10
+ ───────────────────────────────────────────────────────────────────── */
11
+ function patchIsDark() {
12
+ /* Only for the dark variant: the light build of this skin embeds the
13
+ same script, and its stylesheet declares color-scheme: light. */
14
+ if (getComputedStyle(document.documentElement).colorScheme.indexOf('dark') < 0) return;
15
+ if (window.fossil && window.fossil.config && window.fossil.config.skin) {
16
+ window.fossil.config.skin.isDark = true;
17
+ }
18
+ document.body.classList.add('fossil-dark-style');
19
+ }
20
+
21
+ /* ─────────────────────────────────────────────────────────────────────
22
+ 2. Main landmark
23
+ div.content is Fossil's primary content wrapper but has no landmark
24
+ role. Adding role="main" lets screen reader users jump to content.
25
+ ───────────────────────────────────────────────────────────────────── */
26
+ function addMainLandmark() {
27
+ var content = document.querySelector('div.content');
28
+ if (content && !content.getAttribute('role')) {
29
+ content.setAttribute('role', 'main');
30
+ }
31
+ }
32
+
33
+ /* ─────────────────────────────────────────────────────────────────────
34
+ 3. Hamburger menu — the worst accessibility failure in the skin
35
+ ----------------------------------------------------------------
36
+ What Fossil gives us:
37
+ <a id="hbbtn" href="/repo/sitemap" aria-label="Site Map">☰</a>
38
+ <nav id="hbdrop" class="hbdrop" title="sitemap"></nav>
39
+
40
+ Problems:
41
+ - No aria-expanded: screen readers can't tell if the menu is open
42
+ - No aria-controls: no programmatic link between button and panel
43
+ - hbdrop has no role or accessible name beyond an unhelpful title
44
+ - When the menu opens, focus stays on hbbtn — user cannot reach
45
+ the menu links by keyboard without realising the menu opened
46
+ - Escape key does not close the menu
47
+ - hbmenu.js controls visibility via style.display; we use
48
+ MutationObserver to stay in sync rather than patching the JS
49
+
50
+ Fixes applied:
51
+ - aria-expanded / aria-controls on hbbtn
52
+ - role="navigation" + aria-label on hbdrop
53
+ - MutationObserver: sync aria-expanded on every show/hide
54
+ - On open: move focus to the first link in the dropdown
55
+ - On Escape inside dropdown: close panel, return focus to hbbtn
56
+ ───────────────────────────────────────────────────────────────────── */
57
+ function fixHamburgerMenu() {
58
+ var btn = document.getElementById('hbbtn');
59
+ var drop = document.getElementById('hbdrop');
60
+ if (!btn || !drop) return;
61
+
62
+ var nav = btn.closest('nav.mainmenu') || btn.parentNode;
63
+ if (!nav) return;
64
+
65
+ /* Position the dropdown using position:fixed so it overlays content
66
+ regardless of DOM structure. We set --nav-bottom as a CSS variable
67
+ so the dropdown's top edge tracks the nav bar's bottom edge. */
68
+ function setNavBottom() {
69
+ var bottom = Math.max(0, nav.getBoundingClientRect().bottom);
70
+ document.documentElement.style.setProperty('--nav-bottom', bottom + 'px');
71
+ }
72
+ setNavBottom();
73
+ window.addEventListener('resize', setNavBottom);
74
+ /* Measure again on every open (capture: before hbmenu.js shows the
75
+ panel), so the menu opens under the nav bar wherever the page is. */
76
+ btn.addEventListener('click', setNavBottom, true);
77
+ /* Open by touch or mouse vs keyboard: only the keyboard gets focus moved */
78
+ var openedByPointer = false;
79
+ btn.addEventListener('pointerdown', function () { openedByPointer = true; });
80
+ btn.addEventListener('keydown', function () { openedByPointer = false; });
81
+
82
+ /* Static button semantics (JS will keep aria-expanded in sync) */
83
+ btn.setAttribute('aria-expanded', 'false');
84
+ btn.setAttribute('aria-controls', 'hbdrop');
85
+
86
+ /* Panel semantics */
87
+ drop.setAttribute('role', 'navigation');
88
+ drop.setAttribute('aria-label', 'Site map');
89
+
90
+ /* Sync aria-expanded whenever hbmenu.js toggles panel visibility.
91
+ hbmenu.js uses style.display to show/hide — observe that attribute. */
92
+ var menuObserver = new MutationObserver(function () {
93
+ var open = getComputedStyle(drop).display !== 'none';
94
+ btn.setAttribute('aria-expanded', open ? 'true' : 'false');
95
+
96
+ /* Move focus into the panel when it opens so keyboard users
97
+ can immediately navigate the links without guessing. */
98
+ if (open) {
99
+ /* The nav bar may now be stuck to the top (see the skin CSS) */
100
+ requestAnimationFrame(setNavBottom);
101
+ if (!openedByPointer) {
102
+ var firstLink = drop.querySelector('a');
103
+ if (firstLink) firstLink.focus({ preventScroll: true });
104
+ }
105
+ }
106
+ });
107
+ menuObserver.observe(drop, { attributes: true, attributeFilter: ['style'] });
108
+
109
+ /* Escape inside the dropdown: close the panel and return focus.
110
+ We set display directly — this also triggers the MutationObserver
111
+ which will update aria-expanded to 'false'. */
112
+ drop.addEventListener('keydown', function (e) {
113
+ if (e.key === 'Escape' || e.keyCode === 27) {
114
+ drop.style.display = 'none';
115
+ btn.focus();
116
+ }
117
+ });
118
+ }
119
+
120
+ /* ─────────────────────────────────────────────────────────────────────
121
+ 4. Timeline table
122
+ ----------------------------------------------------------------
123
+ Structure Fossil generates:
124
+
125
+ <table class="timelineTable">
126
+ <tr class="timelineDateRow">
127
+ <td><div class="timelineDate">2026-03-14</div></td>
128
+ <td></td> <- empty filler for graph column
129
+ <td></td> <- empty filler for comment column
130
+ </tr>
131
+ <tr>
132
+ <td class="timelineTime">20:16</td>
133
+ <td class="timelineGraph">
134
+ <div class="tl-nodemark"></div> <- JS draws SVG here later
135
+ </td>
136
+ <td class="timelineModernCell" id="mc1">
137
+ <span class="timelineModernComment">commit message</span>
138
+ <span class="timelineModernDetail">...</span>
139
+ </td>
140
+ </tr>
141
+ </table>
142
+
143
+ Fixes applied:
144
+ - aria-label="Commit timeline" on each .timelineTable
145
+ - aria-hidden="true" on all td.timelineGraph cells
146
+ - aria-hidden="true" on filler cells in timelineDateRow rows
147
+ - aria-label="Time: HH:MM" on timelineTime cells
148
+
149
+ Run at defer-time AND on window.load because Fossil's timeline JS
150
+ inserts SVG canvas elements into the graph cells on window.load.
151
+ ───────────────────────────────────────────────────────────────────── */
152
+ function fixTimeline() {
153
+ /* Label each timeline table */
154
+ document.querySelectorAll('table.timelineTable').forEach(function (tbl) {
155
+ if (!tbl.getAttribute('aria-label') && !tbl.querySelector('caption')) {
156
+ tbl.setAttribute('aria-label', 'Commit timeline');
157
+ }
158
+ });
159
+
160
+ /* Hide the graph column — purely visual SVG/canvas drawn by Fossil JS */
161
+ document.querySelectorAll('td.timelineGraph').forEach(function (td) {
162
+ td.setAttribute('aria-hidden', 'true');
163
+ });
164
+
165
+ /* Hide filler cells in date-separator rows */
166
+ document.querySelectorAll('tr.timelineDateRow').forEach(function (tr) {
167
+ tr.querySelectorAll('td + td').forEach(function (td) {
168
+ td.setAttribute('aria-hidden', 'true');
169
+ });
170
+ });
171
+
172
+ /* Give bare time cells a descriptive label.
173
+ Strip stray </a> text artefact Fossil emits in anonymous mode. */
174
+ document.querySelectorAll('td.timelineTime').forEach(function (td) {
175
+ var text = td.textContent.trim();
176
+ if (text && !td.getAttribute('aria-label')) {
177
+ td.setAttribute('aria-label', 'Time: ' + text);
178
+ }
179
+ });
180
+ }
181
+
182
+ /* ─────────────────────────────────────────────────────────────────────
183
+ 5. Sortable table headers — add scope="col"
184
+ Fossil generates <th> elements in branch, tag, file, and ticket
185
+ tables but never includes scope. Screen readers cannot correctly
186
+ associate header text with the cells in each column.
187
+ ───────────────────────────────────────────────────────────────────── */
188
+ function fixTableHeaders() {
189
+ var selector = [
190
+ 'table.sortable th',
191
+ 'table.filelistTable th',
192
+ 'table.branchlistTable th',
193
+ 'table.taglistTable th',
194
+ 'table.userlistTable th',
195
+ 'table.report th',
196
+ ].join(', ');
197
+ document.querySelectorAll(selector).forEach(function (th) {
198
+ if (!th.getAttribute('scope')) {
199
+ th.setAttribute('scope', 'col');
200
+ }
201
+ });
202
+ }
203
+
204
+ /* ─────────────────────────────────────────────────────────────────────
205
+ 6. Submenu select labels
206
+ Fossil renders <select> controls in the page submenu with no
207
+ associated <label>. We add aria-label from the preceding sibling
208
+ label text, falling back to a class-name lookup table.
209
+ ───────────────────────────────────────────────────────────────────── */
210
+ var SELECT_LABELS = {
211
+ 'smc-ss': 'View style',
212
+ 'smc-ci': 'Check-in',
213
+ 'smc-v': 'Version',
214
+ 'smc-r': 'Repository',
215
+ 'smc-b': 'Branch',
216
+ 'smc-t': 'Tag',
217
+ 'smc-u': 'User',
218
+ };
219
+
220
+ /* Charts Fossil draws as <svg width= height=> with no viewBox cannot be
221
+ scaled by CSS. Give them one; the skin's "svg.fit" rule does the rest. */
222
+ function fitCharts() {
223
+ document.querySelectorAll('.content svg[width][height]:not([viewBox])').forEach(function (s) {
224
+ var w = parseFloat(s.getAttribute('width')), h = parseFloat(s.getAttribute('height'));
225
+ if (!(w > 0 && h > 0)) return;
226
+ s.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
227
+ s.classList.add('fit');
228
+ });
229
+ }
230
+
231
+ /* Sortable column headers respond to clicks only. Put them in the tab
232
+ order and let Enter or Space do what a click does. */
233
+ function fixSortableHeaders() {
234
+ document.querySelectorAll('table.sortable th').forEach(function (th) {
235
+ if (th.hasAttribute('tabindex')) return;
236
+ th.setAttribute('tabindex', '0');
237
+ th.addEventListener('keydown', function (e) {
238
+ if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); th.click(); }
239
+ });
240
+ });
241
+ }
242
+
243
+ /* The menu bar scrolls sideways on narrow screens. Bring the current
244
+ page's entry into view, without moving the page itself. */
245
+ function showActiveMenuItem() {
246
+ var nav = document.querySelector('nav.mainmenu');
247
+ var a = nav && nav.querySelector('a.active');
248
+ var hb = document.getElementById('hbbtn');
249
+ if (!a || a === hb || nav.scrollWidth <= nav.clientWidth) return;
250
+ var left = a.offsetLeft - nav.offsetLeft, pinned = hb ? hb.offsetWidth : 0;
251
+ if (left - pinned < nav.scrollLeft || left + a.offsetWidth > nav.scrollLeft + nav.clientWidth - 28) {
252
+ nav.scrollLeft = Math.max(0, left - pinned - 12);
253
+ }
254
+ }
255
+
256
+ function fixSubmenuSelects() {
257
+ document.querySelectorAll('div.submenu select, div.sectionmenu select').forEach(function (sel) {
258
+ if (sel.getAttribute('aria-label') || sel.getAttribute('aria-labelledby')) return;
259
+
260
+ /* Walk backwards through siblings to find a .label text node */
261
+ var prev = sel.previousElementSibling;
262
+ while (prev) {
263
+ if (prev.classList.contains('label') && prev.textContent.trim()) {
264
+ sel.setAttribute('aria-label', prev.textContent.trim());
265
+ return;
266
+ }
267
+ prev = prev.previousElementSibling;
268
+ }
269
+
270
+ /* Class-name lookup */
271
+ var classes = Array.from(sel.classList);
272
+ for (var i = 0; i < classes.length; i++) {
273
+ if (SELECT_LABELS[classes[i]]) {
274
+ sel.setAttribute('aria-label', SELECT_LABELS[classes[i]]);
275
+ return;
276
+ }
277
+ }
278
+
279
+ sel.setAttribute('aria-label', 'Filter');
280
+ });
281
+ }
282
+
283
+ /* ─────────────────────────────────────────────────────────────────────
284
+ 7. Day of week on each timeline date
285
+ Fossil's date rows carry only the date ("2026-11-11"). This puts the
286
+ full weekday on a small line above it. The weekday comes from Ben
287
+ Joffe's branchless method (benjoffe.com/fast-day-of-week), as zit
288
+ uses it: one multiply and two shifts, exact for every 32-bit day
289
+ number. It is read from the date Fossil prints, so it always matches
290
+ that date whether the timeline shows UTC or local time. The skin CSS
291
+ reserves the line before this runs, so setting the name moves nothing.
292
+ ───────────────────────────────────────────────────────────────────── */
293
+ var WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
294
+ function weekdayOf(dayNumber) { /* days since 1970-01-01 -> 0 = Sunday */
295
+ return ((Math.imul(dayNumber, 613566756) + 0x95000000 +
296
+ (dayNumber >> 1) + (dayNumber >> 4)) >>> 0) >>> 29;
297
+ }
298
+ function addWeekdays() {
299
+ var rows = document.querySelectorAll('div.timelineDate');
300
+ for (var i = 0; i < rows.length; i++) {
301
+ if (rows[i].hasAttribute('data-dow')) continue;
302
+ var m = /^(\d{4})-(\d\d)-(\d\d)$/.exec(rows[i].textContent.trim());
303
+ if (!m) continue;
304
+ /* The skin CSS shows this in a line it reserves above the date */
305
+ rows[i].setAttribute('data-dow', WEEKDAYS[weekdayOf(Date.UTC(+m[1], m[2] - 1, +m[3]) / 864e5)]);
306
+ }
307
+ }
308
+
309
+ /* ─────────────────────────────────────────────────────────────────────
310
+ Execute all fixes
311
+ The script is deferred so the DOM is fully parsed when this runs.
312
+ Fossil's inline config scripts have already executed, so
313
+ window.fossil exists and we can patch isDark immediately.
314
+ ───────────────────────────────────────────────────────────────────── */
315
+ patchIsDark();
316
+ addMainLandmark();
317
+ fixHamburgerMenu();
318
+ fixTimeline();
319
+ fixTableHeaders();
320
+ fixSubmenuSelects();
321
+ fitCharts();
322
+ showActiveMenuItem();
323
+ fixSortableHeaders();
324
+ addWeekdays();
325
+
326
+ /* Re-run after window.load: Fossil's timeline renderer inserts
327
+ .tl-canvas SVG elements into td.timelineGraph on load, and
328
+ Fossil's own load handlers may reset isDark. */
329
+ window.addEventListener('load', function () {
330
+ patchIsDark();
331
+ fixTimeline();
332
+ fixTableHeaders();
333
+ fixSubmenuSelects();
334
+ });
335
+
336
+}());
337
+
338
+});
--- a/skins/refined-dark/js.txt
+++ b/skins/refined-dark/js.txt
@@ -0,0 +1,338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/refined-dark/js.txt
+++ b/skins/refined-dark/js.txt
@@ -0,0 +1,338 @@
1 document.addEventListener('DOMContentLoaded', function () {
2 (function () {
3 'use strict';
4
5 /* ─────────────────────────────────────────────────────────────────────
6 1. isDark patch
7 Fossil's C code hard-codes isDark:false for all custom skins,
8 ignoring the skin-detail config key. Patch it here after Fossil's
9 inline scripts have already run (guaranteed by defer).
10 ───────────────────────────────────────────────────────────────────── */
11 function patchIsDark() {
12 /* Only for the dark variant: the light build of this skin embeds the
13 same script, and its stylesheet declares color-scheme: light. */
14 if (getComputedStyle(document.documentElement).colorScheme.indexOf('dark') < 0) return;
15 if (window.fossil && window.fossil.config && window.fossil.config.skin) {
16 window.fossil.config.skin.isDark = true;
17 }
18 document.body.classList.add('fossil-dark-style');
19 }
20
21 /* ─────────────────────────────────────────────────────────────────────
22 2. Main landmark
23 div.content is Fossil's primary content wrapper but has no landmark
24 role. Adding role="main" lets screen reader users jump to content.
25 ───────────────────────────────────────────────────────────────────── */
26 function addMainLandmark() {
27 var content = document.querySelector('div.content');
28 if (content && !content.getAttribute('role')) {
29 content.setAttribute('role', 'main');
30 }
31 }
32
33 /* ─────────────────────────────────────────────────────────────────────
34 3. Hamburger menu — the worst accessibility failure in the skin
35 ----------------------------------------------------------------
36 What Fossil gives us:
37 <a id="hbbtn" href="/repo/sitemap" aria-label="Site Map">☰</a>
38 <nav id="hbdrop" class="hbdrop" title="sitemap"></nav>
39
40 Problems:
41 - No aria-expanded: screen readers can't tell if the menu is open
42 - No aria-controls: no programmatic link between button and panel
43 - hbdrop has no role or accessible name beyond an unhelpful title
44 - When the menu opens, focus stays on hbbtn — user cannot reach
45 the menu links by keyboard without realising the menu opened
46 - Escape key does not close the menu
47 - hbmenu.js controls visibility via style.display; we use
48 MutationObserver to stay in sync rather than patching the JS
49
50 Fixes applied:
51 - aria-expanded / aria-controls on hbbtn
52 - role="navigation" + aria-label on hbdrop
53 - MutationObserver: sync aria-expanded on every show/hide
54 - On open: move focus to the first link in the dropdown
55 - On Escape inside dropdown: close panel, return focus to hbbtn
56 ───────────────────────────────────────────────────────────────────── */
57 function fixHamburgerMenu() {
58 var btn = document.getElementById('hbbtn');
59 var drop = document.getElementById('hbdrop');
60 if (!btn || !drop) return;
61
62 var nav = btn.closest('nav.mainmenu') || btn.parentNode;
63 if (!nav) return;
64
65 /* Position the dropdown using position:fixed so it overlays content
66 regardless of DOM structure. We set --nav-bottom as a CSS variable
67 so the dropdown's top edge tracks the nav bar's bottom edge. */
68 function setNavBottom() {
69 var bottom = Math.max(0, nav.getBoundingClientRect().bottom);
70 document.documentElement.style.setProperty('--nav-bottom', bottom + 'px');
71 }
72 setNavBottom();
73 window.addEventListener('resize', setNavBottom);
74 /* Measure again on every open (capture: before hbmenu.js shows the
75 panel), so the menu opens under the nav bar wherever the page is. */
76 btn.addEventListener('click', setNavBottom, true);
77 /* Open by touch or mouse vs keyboard: only the keyboard gets focus moved */
78 var openedByPointer = false;
79 btn.addEventListener('pointerdown', function () { openedByPointer = true; });
80 btn.addEventListener('keydown', function () { openedByPointer = false; });
81
82 /* Static button semantics (JS will keep aria-expanded in sync) */
83 btn.setAttribute('aria-expanded', 'false');
84 btn.setAttribute('aria-controls', 'hbdrop');
85
86 /* Panel semantics */
87 drop.setAttribute('role', 'navigation');
88 drop.setAttribute('aria-label', 'Site map');
89
90 /* Sync aria-expanded whenever hbmenu.js toggles panel visibility.
91 hbmenu.js uses style.display to show/hide — observe that attribute. */
92 var menuObserver = new MutationObserver(function () {
93 var open = getComputedStyle(drop).display !== 'none';
94 btn.setAttribute('aria-expanded', open ? 'true' : 'false');
95
96 /* Move focus into the panel when it opens so keyboard users
97 can immediately navigate the links without guessing. */
98 if (open) {
99 /* The nav bar may now be stuck to the top (see the skin CSS) */
100 requestAnimationFrame(setNavBottom);
101 if (!openedByPointer) {
102 var firstLink = drop.querySelector('a');
103 if (firstLink) firstLink.focus({ preventScroll: true });
104 }
105 }
106 });
107 menuObserver.observe(drop, { attributes: true, attributeFilter: ['style'] });
108
109 /* Escape inside the dropdown: close the panel and return focus.
110 We set display directly — this also triggers the MutationObserver
111 which will update aria-expanded to 'false'. */
112 drop.addEventListener('keydown', function (e) {
113 if (e.key === 'Escape' || e.keyCode === 27) {
114 drop.style.display = 'none';
115 btn.focus();
116 }
117 });
118 }
119
120 /* ─────────────────────────────────────────────────────────────────────
121 4. Timeline table
122 ----------------------------------------------------------------
123 Structure Fossil generates:
124
125 <table class="timelineTable">
126 <tr class="timelineDateRow">
127 <td><div class="timelineDate">2026-03-14</div></td>
128 <td></td> <- empty filler for graph column
129 <td></td> <- empty filler for comment column
130 </tr>
131 <tr>
132 <td class="timelineTime">20:16</td>
133 <td class="timelineGraph">
134 <div class="tl-nodemark"></div> <- JS draws SVG here later
135 </td>
136 <td class="timelineModernCell" id="mc1">
137 <span class="timelineModernComment">commit message</span>
138 <span class="timelineModernDetail">...</span>
139 </td>
140 </tr>
141 </table>
142
143 Fixes applied:
144 - aria-label="Commit timeline" on each .timelineTable
145 - aria-hidden="true" on all td.timelineGraph cells
146 - aria-hidden="true" on filler cells in timelineDateRow rows
147 - aria-label="Time: HH:MM" on timelineTime cells
148
149 Run at defer-time AND on window.load because Fossil's timeline JS
150 inserts SVG canvas elements into the graph cells on window.load.
151 ───────────────────────────────────────────────────────────────────── */
152 function fixTimeline() {
153 /* Label each timeline table */
154 document.querySelectorAll('table.timelineTable').forEach(function (tbl) {
155 if (!tbl.getAttribute('aria-label') && !tbl.querySelector('caption')) {
156 tbl.setAttribute('aria-label', 'Commit timeline');
157 }
158 });
159
160 /* Hide the graph column — purely visual SVG/canvas drawn by Fossil JS */
161 document.querySelectorAll('td.timelineGraph').forEach(function (td) {
162 td.setAttribute('aria-hidden', 'true');
163 });
164
165 /* Hide filler cells in date-separator rows */
166 document.querySelectorAll('tr.timelineDateRow').forEach(function (tr) {
167 tr.querySelectorAll('td + td').forEach(function (td) {
168 td.setAttribute('aria-hidden', 'true');
169 });
170 });
171
172 /* Give bare time cells a descriptive label.
173 Strip stray </a> text artefact Fossil emits in anonymous mode. */
174 document.querySelectorAll('td.timelineTime').forEach(function (td) {
175 var text = td.textContent.trim();
176 if (text && !td.getAttribute('aria-label')) {
177 td.setAttribute('aria-label', 'Time: ' + text);
178 }
179 });
180 }
181
182 /* ─────────────────────────────────────────────────────────────────────
183 5. Sortable table headers — add scope="col"
184 Fossil generates <th> elements in branch, tag, file, and ticket
185 tables but never includes scope. Screen readers cannot correctly
186 associate header text with the cells in each column.
187 ───────────────────────────────────────────────────────────────────── */
188 function fixTableHeaders() {
189 var selector = [
190 'table.sortable th',
191 'table.filelistTable th',
192 'table.branchlistTable th',
193 'table.taglistTable th',
194 'table.userlistTable th',
195 'table.report th',
196 ].join(', ');
197 document.querySelectorAll(selector).forEach(function (th) {
198 if (!th.getAttribute('scope')) {
199 th.setAttribute('scope', 'col');
200 }
201 });
202 }
203
204 /* ─────────────────────────────────────────────────────────────────────
205 6. Submenu select labels
206 Fossil renders <select> controls in the page submenu with no
207 associated <label>. We add aria-label from the preceding sibling
208 label text, falling back to a class-name lookup table.
209 ───────────────────────────────────────────────────────────────────── */
210 var SELECT_LABELS = {
211 'smc-ss': 'View style',
212 'smc-ci': 'Check-in',
213 'smc-v': 'Version',
214 'smc-r': 'Repository',
215 'smc-b': 'Branch',
216 'smc-t': 'Tag',
217 'smc-u': 'User',
218 };
219
220 /* Charts Fossil draws as <svg width= height=> with no viewBox cannot be
221 scaled by CSS. Give them one; the skin's "svg.fit" rule does the rest. */
222 function fitCharts() {
223 document.querySelectorAll('.content svg[width][height]:not([viewBox])').forEach(function (s) {
224 var w = parseFloat(s.getAttribute('width')), h = parseFloat(s.getAttribute('height'));
225 if (!(w > 0 && h > 0)) return;
226 s.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
227 s.classList.add('fit');
228 });
229 }
230
231 /* Sortable column headers respond to clicks only. Put them in the tab
232 order and let Enter or Space do what a click does. */
233 function fixSortableHeaders() {
234 document.querySelectorAll('table.sortable th').forEach(function (th) {
235 if (th.hasAttribute('tabindex')) return;
236 th.setAttribute('tabindex', '0');
237 th.addEventListener('keydown', function (e) {
238 if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); th.click(); }
239 });
240 });
241 }
242
243 /* The menu bar scrolls sideways on narrow screens. Bring the current
244 page's entry into view, without moving the page itself. */
245 function showActiveMenuItem() {
246 var nav = document.querySelector('nav.mainmenu');
247 var a = nav && nav.querySelector('a.active');
248 var hb = document.getElementById('hbbtn');
249 if (!a || a === hb || nav.scrollWidth <= nav.clientWidth) return;
250 var left = a.offsetLeft - nav.offsetLeft, pinned = hb ? hb.offsetWidth : 0;
251 if (left - pinned < nav.scrollLeft || left + a.offsetWidth > nav.scrollLeft + nav.clientWidth - 28) {
252 nav.scrollLeft = Math.max(0, left - pinned - 12);
253 }
254 }
255
256 function fixSubmenuSelects() {
257 document.querySelectorAll('div.submenu select, div.sectionmenu select').forEach(function (sel) {
258 if (sel.getAttribute('aria-label') || sel.getAttribute('aria-labelledby')) return;
259
260 /* Walk backwards through siblings to find a .label text node */
261 var prev = sel.previousElementSibling;
262 while (prev) {
263 if (prev.classList.contains('label') && prev.textContent.trim()) {
264 sel.setAttribute('aria-label', prev.textContent.trim());
265 return;
266 }
267 prev = prev.previousElementSibling;
268 }
269
270 /* Class-name lookup */
271 var classes = Array.from(sel.classList);
272 for (var i = 0; i < classes.length; i++) {
273 if (SELECT_LABELS[classes[i]]) {
274 sel.setAttribute('aria-label', SELECT_LABELS[classes[i]]);
275 return;
276 }
277 }
278
279 sel.setAttribute('aria-label', 'Filter');
280 });
281 }
282
283 /* ─────────────────────────────────────────────────────────────────────
284 7. Day of week on each timeline date
285 Fossil's date rows carry only the date ("2026-11-11"). This puts the
286 full weekday on a small line above it. The weekday comes from Ben
287 Joffe's branchless method (benjoffe.com/fast-day-of-week), as zit
288 uses it: one multiply and two shifts, exact for every 32-bit day
289 number. It is read from the date Fossil prints, so it always matches
290 that date whether the timeline shows UTC or local time. The skin CSS
291 reserves the line before this runs, so setting the name moves nothing.
292 ───────────────────────────────────────────────────────────────────── */
293 var WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
294 function weekdayOf(dayNumber) { /* days since 1970-01-01 -> 0 = Sunday */
295 return ((Math.imul(dayNumber, 613566756) + 0x95000000 +
296 (dayNumber >> 1) + (dayNumber >> 4)) >>> 0) >>> 29;
297 }
298 function addWeekdays() {
299 var rows = document.querySelectorAll('div.timelineDate');
300 for (var i = 0; i < rows.length; i++) {
301 if (rows[i].hasAttribute('data-dow')) continue;
302 var m = /^(\d{4})-(\d\d)-(\d\d)$/.exec(rows[i].textContent.trim());
303 if (!m) continue;
304 /* The skin CSS shows this in a line it reserves above the date */
305 rows[i].setAttribute('data-dow', WEEKDAYS[weekdayOf(Date.UTC(+m[1], m[2] - 1, +m[3]) / 864e5)]);
306 }
307 }
308
309 /* ─────────────────────────────────────────────────────────────────────
310 Execute all fixes
311 The script is deferred so the DOM is fully parsed when this runs.
312 Fossil's inline config scripts have already executed, so
313 window.fossil exists and we can patch isDark immediately.
314 ───────────────────────────────────────────────────────────────────── */
315 patchIsDark();
316 addMainLandmark();
317 fixHamburgerMenu();
318 fixTimeline();
319 fixTableHeaders();
320 fixSubmenuSelects();
321 fitCharts();
322 showActiveMenuItem();
323 fixSortableHeaders();
324 addWeekdays();
325
326 /* Re-run after window.load: Fossil's timeline renderer inserts
327 .tl-canvas SVG elements into td.timelineGraph on load, and
328 Fossil's own load handlers may reset isDark. */
329 window.addEventListener('load', function () {
330 patchIsDark();
331 fixTimeline();
332 fixTableHeaders();
333 fixSubmenuSelects();
334 });
335
336 }());
337
338 });
--- a/skins/refined-light/css.txt
+++ b/skins/refined-light/css.txt
@@ -0,0 +1,1000 @@
1
+/* Refined Light skin
2
+ A light rendering of Fossil's default skin: same layout, same sizes, same
3
+ menu band and submenu row. Colors are chosen for WCAG AA contrast on a
4
+ near-black page: body text 13:1, muted text 7:1, links 7:1.
5
+ Functional dark-theme overrides for Fossil's hardcoded light colors
6
+ (timeline graph, diffs, chat, forum, tickets) are kept at the end.
7
+ Uses system fonts; no external font resources are needed. */
8
+
9
+
10
+:root {
11
+ --bg: #ffffff;
12
+ --surface: #f4f5f7;
13
+ --surface2: #e8ebef;
14
+ --border: #d3d7dd;
15
+ --text: #1c1e22; /* 16:1 on --bg */
16
+ --muted: #565e68; /* 6.6:1 on --bg */
17
+ --link: #2b67a8; /* 5.8:1 on --bg; near Fossil default's #3779BF */
18
+ --link-hover: #1d4f86;
19
+ --link-on-tint: #1d4f86; /* 5.0-6.4:1 on Fossil's pastel rows */
20
+ --title: #3a7bc0; /* large text; Fossil default's #4183C4 */
21
+ --active: #d26911; /* Fossil default's menu accent */
22
+ --green: #1d7a3c;
23
+ --red: #b3372a;
24
+ --yellow: #8a6100;
25
+ --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
26
+ --mono: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
27
+ color-scheme: light;
28
+ --input-bg: #ffffff; --on-accent: #ffffff; --visited: #5a4fa8;
29
+ --sel-bg: #f7e3cc; --sec-bg: #d9e7f6; --stripe: #f7f8fa; --rule: #e5e8ec;
30
+ --btn-hover: #dde1e6; --band-top: #fafbfc; --warn-bg: #fbf0d0; --err-bg: #fbe1dc;
31
+ --green-rgb: 29 122 60; --red-rgb: 179 55 42; --yellow-rgb: 190 140 0;
32
+ --link-rgb: 43 103 168; --teal-rgb: 20 140 130; --violet-rgb: 90 90 200;
33
+ --muted-rgb: 86 94 104; --veil-rgb: 255 255 255; --lift-rgb: 0 0 0; --shadow-rgb: 0 0 0;
34
+ --tint-rgb: 255 255 255; --tint-mute: 0; --chat-mute: 0; --bubble-shadow: 0.10; --popup-shadow: 0.16;
35
+ --veil: 0;
36
+}
37
+
38
+/* Base, matching the default skin's sizing */
39
+body {
40
+ box-sizing: border-box;
41
+ min-height: 100vh;
42
+ min-height: 100dvh;
43
+ display: flex;
44
+ flex-direction: column;
45
+ margin: 0 auto;
46
+ background-color: var(--bg);
47
+ color: var(--text);
48
+ font-family: var(--font);
49
+ font-size: 16px;
50
+ line-height: 1.45;
51
+}
52
+a { color: var(--link); text-decoration: none; }
53
+a:hover { color: var(--link-hover); text-decoration: underline; }
54
+a:visited { color: var(--visited); }
55
+code, pre, tt, kbd, samp, var { font-family: var(--mono); }
56
+code, tt, kbd, samp { font-size: 0.94em; }
57
+pre { font-size: 0.92em; line-height: 1.35; overflow-x: auto; }
58
+hr { border: none; border-top: 1px solid var(--border); }
59
+blockquote { border-left: 3px solid var(--border); margin: 0.5em 0; padding: 0.1em 1em; }
60
+img { max-width: 100%; }
61
+
62
+/* Title area above the menu bar */
63
+header { display: flex; align-items: center; gap: 14px; padding: 14px 0 12px; }
64
+.skip-nav {
65
+ position: absolute; top: -100%; left: 0;
66
+ background: var(--link); color: var(--on-accent);
67
+ padding: 0.5rem 1.25rem; font-weight: 600; z-index: 9999;
68
+ border-radius: 0 0 6px 0;
69
+}
70
+.skip-nav:focus { top: 0; outline: 2px solid #fff; outline-offset: -4px; }
71
+
72
+div.logo { display: flex; flex-shrink: 0; }
73
+div.logo img, img.logo-mark { width: 48px; height: 48px; object-fit: cover; display: block; border-radius: 6px; }
74
+.hub-link:hover img { opacity: 0.85; }
75
+
76
+.title { min-width: 0; color: var(--title); line-height: 1.2; }
77
+.title h1, .title .project-name {
78
+ display: inline;
79
+ font-size: 2.2em;
80
+ font-weight: bold;
81
+ color: var(--title);
82
+ text-decoration: none;
83
+}
84
+.title .project-name:hover { color: var(--link-hover); text-decoration: none; }
85
+.title h1:after, .title .project-name:after {
86
+ content: " / "; color: var(--muted); font-weight: normal;
87
+}
88
+span.page-title { font-size: 18px; color: var(--text); }
89
+/* Hidden from view but not display:none: Fossil's forum script sizes its
90
+ expand control from the height of the first h1 on the page, and loops
91
+ forever if that height is 0. This also keeps the heading for screen readers. */
92
+h1.page-title {
93
+ font-size: 1.6em; color: var(--text);
94
+ display: block; position: absolute; width: 1px; margin: 0; padding: 0;
95
+ overflow: hidden; clip-path: inset(50%); white-space: nowrap;
96
+}
97
+/* Home pages carry their own heading; Fossil's "index" / "Home" title is noise */
98
+h1.page-title.home-title { display: none !important; }
99
+/* Long document titles go in the body instead of the title bar */
100
+.artifact h1.page-title, .dir h1.page-title, .doc h1.page-title, .wiki h1.page-title {
101
+ position: static; width: auto; overflow: visible; clip-path: none; white-space: normal;
102
+ margin: revert; margin-bottom: 0;
103
+}
104
+.artifact .title > .page-title, .dir .title > .page-title,
105
+.doc .title > .page-title, .wiki .title > .page-title { display: none; }
106
+/* ...unless the page opens with a heading of its own (a wiki page's first
107
+ heading, "History of ...", "Files in ..."): the title would say it twice */
108
+body:has(div.content > :is(h1, h2):first-child, div.content > span:first-child + :is(h1, h2),
109
+ div.content > :is(.markdown, .fossil-doc) > :is(h1, h2):first-child,
110
+ div.content > span:first-child + :is(.markdown, .fossil-doc) > :is(h1, h2):first-child) h1.page-title {
111
+ position: absolute; width: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
112
+}
113
+.artifact .title h1:after, .dir .title h1:after, .doc .title h1:after, .wiki .title h1:after,
114
+.artifact .title .project-name:after, .dir .title .project-name:after,
115
+.doc .title .project-name:after, .wiki .title .project-name:after { content: ""; }
116
+
117
+.status { margin-left: auto; font-size: 0.9em; }
118
+.status a { color: var(--muted); }
119
+.status a:hover { color: var(--text); }
120
+
121
+/* Main menu band */
122
+.mainmenu {
123
+ clear: both;
124
+ background: var(--surface) linear-gradient(var(--band-top), var(--surface)) repeat-x;
125
+ border: 1px solid var(--border);
126
+ border-radius: 5px;
127
+ overflow-x: auto;
128
+ overflow-y: hidden;
129
+ white-space: nowrap;
130
+ z-index: 21;
131
+}
132
+.mainmenu a {
133
+ display: inline-block;
134
+ line-height: 1.4;
135
+ color: var(--muted);
136
+ text-decoration: none;
137
+ border-right: 1px solid var(--border);
138
+ font-weight: 500;
139
+}
140
+.mainmenu a.active, .mainmenu a:hover {
141
+ color: var(--text);
142
+ border-bottom: 2px solid var(--active);
143
+ text-decoration: none;
144
+}
145
+#hbbtn { font-size: 1.15em; min-width: 44px; text-align: center; }
146
+#hbbtn[aria-expanded="true"] { color: var(--text); background: var(--surface2); }
147
+
148
+/* Hamburger dropdown (hbmenu.js toggles display; a11y.js sets --nav-bottom) */
149
+nav#hbdrop {
150
+ background-color: var(--surface);
151
+ border: 1px solid var(--border);
152
+ border-top: none;
153
+ border-radius: 0 0 0.5em 0.5em;
154
+ display: none;
155
+ font-size: 0.95em;
156
+ position: fixed;
157
+ top: var(--nav-bottom, 88px);
158
+ left: 0; right: 0;
159
+ z-index: 200;
160
+ box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.5);
161
+ overflow-x: hidden;
162
+ max-height: 75vh;
163
+ overflow-y: auto;
164
+}
165
+ul#sitemap {
166
+ padding: 1.25rem 1.5rem 1.5rem;
167
+ margin: 0;
168
+ list-style: none;
169
+ column-width: 14em;
170
+ column-gap: 2.5rem;
171
+}
172
+ul#sitemap > li {
173
+ list-style: none;
174
+ margin: 0 0 1.1rem;
175
+ break-inside: avoid;
176
+}
177
+ul#sitemap > li > a {
178
+ display: inline-block;
179
+ font-size: 0.78em;
180
+ font-weight: 600;
181
+ letter-spacing: 0.06em;
182
+ text-transform: uppercase;
183
+ color: var(--muted);
184
+ padding: 0.3rem 0;
185
+}
186
+ul#sitemap > li > a:hover { color: var(--text); text-decoration: none; }
187
+ul#sitemap ul { margin: 0.15rem 0 0; padding: 0; list-style: none; }
188
+ul#sitemap ul li { list-style: none; }
189
+ul#sitemap ul li a {
190
+ display: flex; align-items: center; box-sizing: border-box; /* text stays centered at any row height */
191
+ color: var(--text);
192
+ padding: 0.3rem 0.6rem;
193
+ margin-left: -0.6rem;
194
+ border-radius: 4px;
195
+ min-height: 36px;
196
+}
197
+ul#sitemap ul li a:hover { background: var(--surface2); color: var(--link-hover); text-decoration: none; }
198
+nav#hbdrop ul#sitemap { column-width: 14em; }
199
+ul#sitemap.columns { overflow-x: hidden; }
200
+
201
+/* Submenu row, like the default: a horizontal strip under the menu band */
202
+.submenu, .sectionmenu {
203
+ font-size: 0.9em;
204
+ padding: 8px 0;
205
+ margin-bottom: 4px;
206
+ border-bottom: 1px solid var(--border);
207
+ display: flex;
208
+ flex-wrap: wrap;
209
+ align-items: center;
210
+ gap: 0.25rem 0.5rem;
211
+}
212
+.submenu a, .submenu label, .sectionmenu a {
213
+ padding: 6px 10px;
214
+ text-decoration: none;
215
+ color: var(--link);
216
+ border: 1px solid transparent;
217
+ border-radius: 5px;
218
+ white-space: nowrap;
219
+}
220
+.submenu > a:first-child { margin-left: -10px; }
221
+.submenu a:hover, .submenu label:hover, .sectionmenu a:hover {
222
+ border-color: var(--border);
223
+ background: var(--surface);
224
+ color: var(--text);
225
+ text-decoration: none;
226
+}
227
+span.submenuctrl, span.submenuctrl input, select.submenuctrl { color: var(--muted); }
228
+span.submenuctrl { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem; }
229
+.submenuckbox { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text); cursor: pointer; }
230
+.submenu select, .submenu input[type=text], .sectionmenu select, .sectionmenu input[type=text] {
231
+ width: auto;
232
+ font-size: 0.95em;
233
+ padding: 0.3em 0.5em;
234
+}
235
+.submenu select, .sectionmenu select { padding-right: 1.9em; }
236
+.section {
237
+ font-size: 1em; font-weight: bold;
238
+ background-color: var(--surface);
239
+ border: 1px solid var(--border);
240
+ border-radius: 3px 3px 0 0;
241
+ padding: 9px 10px 10px;
242
+ margin: 10px 0;
243
+}
244
+.sectionmenu {
245
+ border: 1px solid var(--border);
246
+ border-radius: 0 0 3px 3px;
247
+ border-top: 0;
248
+ margin-top: -10px;
249
+ margin-bottom: 10px;
250
+}
251
+
252
+/* Content */
253
+.content { padding: 12px 0; color: var(--text); }
254
+.content h1 { font-size: 1.60em; color: var(--text); }
255
+.content h2 { font-size: 1.45em; color: var(--text); }
256
+.content h3 { font-size: 1.15em; color: var(--text); }
257
+.content h4 { font-size: 1.05em; color: var(--text); }
258
+.content h5 { font-size: 1.00em; color: var(--text); }
259
+.content pre, table.numbered-lines > tbody > tr { hyphens: none; line-height: 1.3; }
260
+.content ul:not(.browser) > li { list-style-type: disc; }
261
+div.filetree ul li.dir, div.filetree ul li.subdir, div.filetree ul li.file { list-style-type: none; }
262
+th { text-align: left; }
263
+
264
+/* User content: wiki, embedded docs, forum posts */
265
+.markdown blockquote, p.blockquote, .sidebar {
266
+ background-color: var(--surface);
267
+ border-left: 4px solid var(--link);
268
+}
269
+div.sidebar { outline: 1em solid var(--bg); }
270
+.artifact > .content > p > code, .artifact > .content > .markdown > p > code, .artifact > .content > .fossil-doc > p > code,
271
+.dir > .content > p > code, .dir > .content > .markdown > p > code,
272
+.doc > .content > p > code, .doc > .content > .markdown > p > code, .doc > .content > .fossil-doc > p > code,
273
+.forum > .content .markdown > p > code,
274
+.wiki > .content > p > code, .wiki > .content > .markdown > p > code, .wiki > .content > .fossil-doc > p > code,
275
+.content li > code, .content td > code {
276
+ background-color: var(--surface);
277
+ border: 1px solid var(--border);
278
+ border-radius: 3px;
279
+ padding: 0 4px;
280
+}
281
+.artifact > .content > pre, .artifact > .content > .markdown > pre, .artifact > .content > .fossil-doc > pre,
282
+.dir > .content > pre, .dir > .content > .markdown > pre,
283
+.doc > .content > pre, .doc > .content > .markdown > pre, .doc > .content > .fossil-doc > pre,
284
+.forum > .content .markdown > pre,
285
+.wiki > .content > pre, .wiki > .content > .markdown > pre, .wiki > .content > .fossil-doc > pre,
286
+pre.verbatim, pre.textPlain {
287
+ background-color: var(--surface);
288
+ border: 1px solid var(--border);
289
+ border-radius: 4px;
290
+ padding: 8px 10px;
291
+}
292
+pre.verbatim { white-space: pre-wrap; }
293
+.artifact > .content table, .dir > .content table, .doc > .content table, .wiki > .content table,
294
+.forum > .content .markdown table {
295
+ background-color: var(--surface);
296
+ border: 1px solid var(--border);
297
+ border-radius: 0.5em;
298
+ border-spacing: 0;
299
+ padding: 6px;
300
+}
301
+.artifact > .content th, .dir > .content th, .doc > .content th, .wiki > .content th,
302
+.forum > .content .markdown th {
303
+ border-bottom: 1px solid var(--border);
304
+ background-color: var(--surface2);
305
+ padding: 4px 6px;
306
+}
307
+.artifact > .content tr:nth-child(odd) td, .dir > .content tr:nth-child(odd) td,
308
+.doc > .content tr:nth-child(odd) td, .wiki > .content tr:nth-child(odd) td {
309
+ background-color: var(--stripe);
310
+}
311
+.artifact > .content td, .dir > .content td, .doc > .content td, .wiki > .content td,
312
+.forum > .content .markdown td { padding: 4px 6px; }
313
+textarea.wikiedit { font-size: 1.1em; }
314
+
315
+/* Forms */
316
+input[type=text], input[type=password], input[type=email], input[type=search],
317
+input[type=number], textarea, select {
318
+ background: var(--input-bg);
319
+ border: 1px solid var(--border);
320
+ border-radius: 4px;
321
+ color: var(--text);
322
+ font-family: var(--font);
323
+ font-size: 1em;
324
+ padding: 0.35em 0.6em;
325
+}
326
+textarea { font-family: var(--mono); }
327
+select {
328
+ appearance: none;
329
+ -webkit-appearance: none;
330
+ padding-right: 2em;
331
+ line-height: 1.3;
332
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23565e68' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
333
+ background-repeat: no-repeat;
334
+ background-position: right 0.6em center;
335
+ background-size: 12px;
336
+ cursor: pointer;
337
+}
338
+select:hover { border-color: var(--muted); }
339
+select option { background: var(--input-bg); color: var(--text); }
340
+input:focus, textarea:focus, select:focus { border-color: var(--link); outline: none; }
341
+input[type=submit], input[type=button], button {
342
+ background: var(--surface2);
343
+ border: 1px solid var(--border);
344
+ border-radius: 4px;
345
+ color: var(--text);
346
+ cursor: pointer;
347
+ font-family: var(--font);
348
+ font-size: 1em;
349
+ padding: 0.35em 1em;
350
+}
351
+input[type=submit]:hover, input[type=button]:hover, button:hover {
352
+ border-color: var(--muted);
353
+ background: var(--btn-hover);
354
+}
355
+input[type=submit]:disabled, input[type=button]:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; }
356
+:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
357
+.mainmenu a:focus-visible { outline-offset: -3px; }
358
+
359
+/* Let short pages fill the viewport without overlaying long content. */
360
+body > .content { flex: 1 0 auto; min-width: 0; }
361
+body > header, body > nav, body > footer { flex-shrink: 0; }
362
+
363
+/* Footer */
364
+footer {
365
+ border-top: 1px solid var(--border);
366
+ padding: 10px;
367
+ font-size: 0.85em;
368
+ margin-top: 10px;
369
+ color: var(--muted);
370
+ display: flex;
371
+ justify-content: space-between;
372
+ flex-wrap: wrap;
373
+ gap: 0.5rem;
374
+}
375
+
376
+/* Forum */
377
+.forum a:visited { color: var(--visited); }
378
+div.forumSel {
379
+ animation: 1s linear 0s sel-fade;
380
+ background-color: var(--bg);
381
+ border-left: 4px solid var(--link);
382
+}
383
+@keyframes sel-fade { from { background-color: var(--surface2); } to { background-color: var(--bg); } }
384
+.forum form input { margin: 0.5em 0; }
385
+div.forumTime, div.forumHier, div.forumHierRoot {
386
+ background: var(--surface) !important;
387
+ border: 1px solid var(--border) !important;
388
+ border-radius: 4px;
389
+ color: var(--text) !important;
390
+}
391
+div.forumTime.forumSel, div.forumHier.forumSel { border-color: var(--link) !important; }
392
+div.forumObs { opacity: 0.75; }
393
+div.forumPostBody, div.forumPostBody h1, div.forumPostBody h2, div.forumPostBody h3 { color: var(--text) !important; }
394
+.forum-post-collapser {
395
+ border-color: var(--border) !important;
396
+ background: var(--surface) !important;
397
+ color: var(--muted) !important;
398
+}
399
+.forum-post-collapser:hover { background: var(--surface2) !important; color: var(--text) !important; }
400
+div.searchForm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1em 0; }
401
+
402
+/* Tickets and reports */
403
+table.report { cursor: auto; border: 1px solid var(--border); border-radius: 0.5em; margin: 1em 0; }
404
+.report td, .report th { border: 0; font-size: 0.9em; padding: 8px 10px; }
405
+.report th { cursor: pointer; background: var(--surface); }
406
+.report thead + tbody tr:hover { background-color: var(--surface2) !important; }
407
+body.report table.report tr td { color: var(--text) !important; }
408
+body.report table.report a { color: var(--link) !important; }
409
+td.tktDspLabel { width: 70px; text-align: right; overflow: hidden; color: var(--muted) !important; }
410
+td.tktDspValue {
411
+ text-align: left; vertical-align: top;
412
+ background-color: var(--surface) !important;
413
+ border: 1px solid var(--border) !important;
414
+ color: var(--text) !important;
415
+}
416
+td.tktDspValue pre { white-space: pre-wrap; }
417
+
418
+/* Timeline */
419
+span.timelineDetail { font-size: 90%; }
420
+div.timelineDate { font-weight: bold; white-space: nowrap; color: var(--muted); }
421
+table.timelineTable { padding: 0 3px; }
422
+table.timelineTable tr { border-radius: 1em; }
423
+.timelineModernCell, .timelineColumnarCell, .timelineDetailCell { border-radius: 0.5em; }
424
+.timelineModernCell[id], .timelineColumnarCell[id], .timelineDetailCell[id] { background-color: var(--surface); }
425
+.timelineModernDetail { opacity: 1; color: var(--muted); font-size: 0.9em; }
426
+.timelineModernComment { color: var(--text); }
427
+td.timelineTime { color: var(--muted); font-family: var(--mono); font-size: 0.9em; white-space: nowrap; }
428
+span.timelineHash { font-family: var(--mono); }
429
+tr.timelineSelected, tr.timelineSecondary { background-color: unset; }
430
+tr.timelineSelected td, span.timelineSelected { background-color: var(--sel-bg) !important; }
431
+tr.timelineSecondary td, span.timelineSecondary { background-color: var(--sec-bg) !important; }
432
+tr.timelineCurrent td:first-child, tr.timelineSecondary td:first-child, tr.timelineSelected td:first-child {
433
+ border-top-left-radius: 1em; border-bottom-left-radius: 1em;
434
+}
435
+tr.timelineCurrent td:last-child, tr.timelineSecondary td:last-child, tr.timelineSelected td:last-child {
436
+ border-top-right-radius: 1em; border-bottom-right-radius: 1em;
437
+}
438
+tr.timelineCurrent td { border-top: 1px dashed var(--muted); border-bottom: 1px dashed var(--muted); }
439
+tr.timelineCurrent td:first-child { border-left: 1px dashed var(--muted); }
440
+tr.timelineCurrent td:last-child { border-right: 1px dashed var(--muted); }
441
+
442
+/* Timeline graph: Fossil hardcodes black lines and white nodes */
443
+.tl-node { background: var(--link) !important; border-color: var(--text) !important; }
444
+.tl-node.leaf:after { background: var(--bg) !important; }
445
+.tl-node.closed-leaf svg { color: var(--bg) !important; }
446
+.tl-line { background-color: var(--muted); }
447
+.tl-line.warp { background: var(--yellow) !important; }
448
+.tl-line.cherrypick.h { border-top-color: var(--muted) !important; background: transparent !important; }
449
+.tl-line.cherrypick.v, .tl-line.dotted.v { border-left-color: var(--muted) !important; background: transparent !important; }
450
+.tl-arrow.u, .tl-arrow.u.sm { border-bottom-color: var(--muted) !important; }
451
+.tl-arrow.merge.l, .tl-arrow.cherrypick.l { border-right-color: var(--muted) !important; }
452
+.tl-arrow.merge.r, .tl-arrow.cherrypick.r { border-left-color: var(--muted) !important; }
453
+.tl-arrow.warp { border-left-color: var(--yellow) !important; }
454
+/* Branch colors are pastel inline backgrounds; darken them so text stays readable */
455
+/* Branch and user tints come from Fossil, already sized for this foreground */
456
+.tl-tooltip {
457
+ background: var(--surface2) !important; color: var(--text) !important;
458
+ border-color: var(--border) !important; box-shadow: 0 4px 16px rgb(var(--shadow-rgb) / 0.5) !important;
459
+}
460
+
461
+/* Lists and tables Fossil generates */
462
+table.sortable th, table.filelistTable th, .fileage th {
463
+ text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); cursor: pointer;
464
+}
465
+table.sortable td, table.filelistTable td, .fileage td { padding: 5px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
466
+table.sortable tr:hover td, .fileage tr:hover, div.filetreeline:hover { background: var(--surface) !important; }
467
+body.branch .brlist > table > tbody > tr:hover:not(.selected) { background: var(--surface) !important; }
468
+body.branch .brlist > table > tbody > tr.selected { background: var(--surface2) !important; }
469
+.branch-name, span.tagDsp {
470
+ display: inline-block; background: var(--surface2); border: 1px solid var(--border);
471
+ border-radius: 3px; color: var(--link); font-family: var(--mono); font-size: 0.85em; padding: 0 0.3em;
472
+}
473
+
474
+/* Diffs: Fossil's built-in colors are pale pastels */
475
+table.diff { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.9em; }
476
+td.difflnc, td.difflna, td.difflnb { color: var(--muted); padding: 0 0.5em; text-align: right; user-select: none; border-right: 1px solid var(--border); }
477
+td.difftext { padding: 0 0.5em; white-space: pre; }
478
+tr.diffskip, tr.diffskip.jchunk { background: var(--surface) !important; }
479
+tr.diffskip > td.chunkctrl .jcbutton { background: var(--surface2) !important; color: var(--muted) !important; border-radius: 3px; }
480
+tr.diffskip > td.chunkctrl .jcbutton:hover { color: var(--text) !important; }
481
+td.diffmkrl, td.diffmkrr, td.diffmkru { color: var(--muted); }
482
+tr.diffadd td { background: rgb(var(--green-rgb) / 0.10); }
483
+tr.diffrm td { background: rgb(var(--red-rgb) / 0.10); }
484
+tr.diffchng td { background: rgb(var(--yellow-rgb) / 0.07); }
485
+span.diffadd { color: var(--green); }
486
+span.diffrm { color: var(--red); }
487
+span.diffchng { color: var(--yellow); }
488
+td.diffln ins, td.difftxt ins, table.diff pre > ins { background-color: rgb(var(--green-rgb) / 0.16) !important; }
489
+td.diffln del, td.difftxt del, table.diff pre > del { background-color: rgb(var(--red-rgb) / 0.16) !important; }
490
+td.difftxt del > del, table.diff pre > del > del { background-color: rgb(var(--red-rgb) / 0.32) !important; }
491
+td.difftxt ins > ins, table.diff pre > ins > ins { background-color: rgb(var(--green-rgb) / 0.32) !important; }
492
+td.difftxt del > del.edit, td.difftxt ins > ins.edit,
493
+table.diff pre > del > del.edit, table.diff pre > ins > ins.edit { background-color: rgb(var(--link-rgb) / 0.25) !important; }
494
+
495
+/* Annotate / blame: inline pastel backgrounds from Fossil JS */
496
+td.annotateDate, td.annotateUser { color: var(--muted); font-family: var(--mono); font-size: 0.85em; padding: 0 0.5em; white-space: nowrap; border-right: 1px solid var(--border); }
497
+pre span[style*="background"], li span[style*="background"] {
498
+ background-image: linear-gradient(rgb(var(--veil-rgb) / 0.7), rgb(var(--veil-rgb) / 0.7)) !important;
499
+ border-radius: 3px; padding: 0.1em 0.25em;
500
+}
501
+
502
+/* Any inline pastel background Fossil emits (ticket reports and their key,
503
+ ticket pages, annotate legends, branch lists): darken it, keep the hue */
504
+tr[style*="background-color"], td[style*="background-color"], th[style*="background-color"],
505
+span[style*="background-color"], div[style*="background-color"], p[style*="background-color"] {
506
+ background-image: linear-gradient(rgb(var(--veil-rgb) / var(--veil, 0.35)), rgb(var(--veil-rgb) / var(--veil, 0.35))) !important;
507
+ color: var(--text);
508
+}
509
+tr[style*="background-color"] a, td[style*="background-color"] a, p[style*="background-color"] a { color: var(--link); }
510
+p[style*="border:1px solid"] { border-color: var(--border) !important; border-radius: 4px; padding: 0.6em 0.8em; }
511
+/* Pikchr: Fossil already draws white defaults because skin-detail is white-foreground; leave diagrams alone */
512
+
513
+/* Fossil's user and branch colors, muted toward the surface so they sit with the skin */
514
+table.timelineTable td[style*="background"] {
515
+ background-image: linear-gradient(rgb(var(--tint-rgb) / var(--tint-mute)), rgb(var(--tint-rgb) / var(--tint-mute))) !important;
516
+}
517
+body.chat .message-widget-content[style*="background"] {
518
+ background-image: linear-gradient(rgb(var(--tint-rgb) / var(--chat-mute)), rgb(var(--tint-rgb) / var(--chat-mute))) !important;
519
+}
520
+body.chat .message-widget-tab[style*="background"] { background-image: none !important; }
521
+body.chat .message-widget-content { box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / var(--bubble-shadow)) !important; }
522
+
523
+/* Misc Fossil UI elements with hardcoded light colors */
524
+div.debug { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--muted) !important; padding: 0.75rem; }
525
+/* Inline debug markers, e.g. "(artifact-NNN)" on forum posts for admins: just quieter text */
526
+span.debug { background: none !important; border: none !important; padding: 0 !important; color: var(--muted) !important; font-size: 0.85em; }
527
+span.debug a { color: var(--muted); }
528
+span.debug a:hover { color: var(--link); }
529
+span.error { background: rgb(var(--yellow-rgb) / 0.18) !important; color: var(--yellow) !important; padding: 0.1em 0.25em; border-radius: 3px; }
530
+mark { background: rgb(var(--yellow-rgb) / 0.25); color: var(--text); padding: 0.1em 0.25em; border-radius: 3px; }
531
+div.sideboxTitle { color: var(--title); font-weight: 600; }
532
+div.sidebox { background: var(--surface); border: 1px solid var(--border) !important; border-radius: 4px; margin: 0 0 1em 1.5em; padding: 0.75em; }
533
+.disabled { color: var(--red); }
534
+.modpending { color: var(--yellow); }
535
+.fossil-tooltip.help-buttonlet-content { background-color: var(--surface2); color: var(--text); border: 1px solid var(--border); }
536
+.fossil-tooltip { background: var(--surface2) !important; color: var(--text) !important; border-color: var(--border) !important; }
537
+td.capsumRead { background: rgb(var(--green-rgb) / 0.15) !important; color: var(--green); }
538
+td.capsumWrite { background: rgb(var(--yellow-rgb) / 0.15) !important; color: var(--yellow); }
539
+td.capsumOff { background: rgb(var(--muted-rgb) / 0.1) !important; color: var(--muted); }
540
+table.login_out { margin: 1em 0; }
541
+td.login_out_label { color: var(--muted); padding: 0.4em 0.75em 0.4em 0; }
542
+.help-buttonlet { color: var(--link); cursor: pointer; }
543
+
544
+/* Status text Fossil colors pure red / blue / black */
545
+span.disabled, span.wikiError, span.loginError, span.tktError, span.brokenlink, span.thTrace,
546
+p.generalError, p.tktsetupError, p.xfersetupError, p.thmainError, p.reportError, blockquote.reportError,
547
+pre.th1error, span.ueditInheritDeveloper, td.tktTlOpen,
548
+div.markdown ol.footnotes > li.fn-misreference > span, div.markdown ol.footnotes > li.fn-unreferenced > code,
549
+div.markdown sup.noteref.misref, div.markdown sup.noteref.misref > a { color: var(--red) !important; }
550
+span.ueditInheritAnonymous, p.missingPriv, p.noMoreShun, p.shunned { color: var(--link) !important; }
551
+span.ueditInheritReader { color: var(--text) !important; }
552
+blockquote.reportError, p.generalError { background: rgb(var(--red-rgb) / 0.1); border: 1px solid rgb(var(--red-rgb) / 0.4); border-radius: 4px; padding: 0.6em 0.8em; }
553
+/* Fossil also puts class="error" on <body> and colors it yellow; keep the page as it is */
554
+body.error, body.warning { background: var(--bg) !important; color: var(--text) !important; }
555
+.error:not(body), .warning:not(body) { background: rgb(var(--yellow-rgb) / 0.18) !important; color: var(--yellow) !important; border-radius: 3px; padding: 0.1em 0.3em; }
556
+table.numbered-lines td.line-numbers span.selected-line { color: var(--text) !important; background-color: rgb(var(--link-rgb) / 0.22) !important; }
557
+.fossil-toast-message { background: var(--surface2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 6px !important; box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.5) !important; }
558
+.fossil-toast-message.error, .fossil-toast-message.warning { background: var(--warn-bg) !important; color: var(--yellow) !important; border-color: var(--yellow) !important; }
559
+.fossil-toast-message.error { color: var(--red) !important; border-color: var(--red) !important; background: var(--err-bg) !important; }
560
+
561
+/* Wiki / file editor tabs */
562
+.tab-container .tab-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--border); }
563
+.tab-container .tab-button {
564
+ padding: 0.4em 0.9em; border: 1px solid transparent; border-bottom: none; border-radius: 5px 5px 0 0;
565
+ background: transparent; color: var(--muted); font-family: var(--font); font-size: 0.95em; cursor: pointer; margin-bottom: -1px;
566
+}
567
+.tab-container .tab-button:hover { color: var(--text); background: var(--surface); }
568
+.tab-container .tab-button.selected { color: var(--text); background: var(--surface); border-color: var(--border); border-bottom-color: var(--surface); }
569
+#fossil-status-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-family: var(--mono); font-size: 0.85em; padding: 0.4em 0.75em; margin: 0.5em 0; }
570
+.wikiedit-options, .fileedit-options { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.5em; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 0.5em; }
571
+.wikiedit-options .input-with-label, .fileedit-options .input-with-label { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
572
+#wikiedit-tab-content textarea, #fileedit-tab-content textarea { min-height: 300px; width: 100%; }
573
+.tab-container fieldset { border: 1px solid var(--border); border-radius: 4px; }
574
+.tab-container fieldset legend { color: var(--muted); }
575
+button.wikiedit-content-reload, button.fileedit-content-reload { min-width: unset !important; max-width: unset !important; }
576
+
577
+/* Chat: Fossil sets inline pastel backgrounds per user */
578
+/* Each message keeps the user's color, which Fossil already picks for this
579
+ skin's foreground (white-foreground); only messages without one get --surface. */
580
+body.chat .message-widget-content {
581
+ background-color: var(--surface); border: 1px solid var(--border) !important;
582
+ border-radius: 6px !important; color: var(--text) !important; padding: 0.5em 0.75em !important;
583
+}
584
+body.chat .message-widget-tab { background: transparent !important; color: var(--muted) !important; border: none !important; font-size: 0.9em !important; }
585
+body.chat .message-widget-tab[style*="background"] { background-image: none !important; }
586
+body.chat .message-widget-tab .xfrom { color: var(--link) !important; font-weight: 600 !important; }
587
+body.chat #chat-input-line-wrapper { border: 1px solid var(--border) !important; border-radius: 6px !important; background: var(--input-bg) !important; }
588
+body.chat #chat-input-line-wrapper:focus-within { border-color: var(--link) !important; }
589
+body.chat .chat-input-field { border: none !important; background: transparent !important; color: var(--text) !important; font-family: var(--font) !important; font-size: 1em !important; }
590
+body.chat .cbutton { border: 1px solid var(--border) !important; background: var(--surface) !important; border-radius: 4px !important; }
591
+body.chat .cbutton:hover { background: var(--surface2) !important; }
592
+body.chat fieldset { border: 1px solid var(--border) !important; border-radius: 4px !important; background: var(--surface) !important; }
593
+body.chat .menu-entry { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
594
+body.chat .menu-entry:hover, body.chat .menu-entry.parent { background: var(--surface2) !important; }
595
+body.chat .message-widget .match { background: rgb(var(--yellow-rgb) / 0.25) !important; color: var(--text) !important; }
596
+body.chat .chat-message-popup { background: var(--surface2) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
597
+body.chat .message-widget-content img { max-width: 100% !important; border-radius: 4px !important; }
598
+
599
+/* Chat toolbar: Fossil renders the buttons as emoji; mask them with icons, keep the spans intact */
600
+body.chat #chat-buttons-wrapper > .cbutton {
601
+ position: relative !important;
602
+ font-size: 0 !important;
603
+ color: transparent !important;
604
+ min-width: 44px !important; max-width: 44px !important;
605
+ min-height: 36px !important; height: 36px !important;
606
+ background: var(--surface) !important;
607
+ border: 1px solid var(--border) !important;
608
+ border-radius: 6px !important;
609
+}
610
+body.chat #chat-buttons-wrapper > .cbutton::after {
611
+ content: ""; position: absolute; inset: 0; margin: auto;
612
+ width: 22px; height: 22px;
613
+ background-color: var(--muted);
614
+ -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
615
+}
616
+body.chat #chat-buttons-wrapper > .cbutton:hover { background: var(--surface2) !important; border-color: var(--muted) !important; }
617
+body.chat #chat-buttons-wrapper > .cbutton:hover::after { background-color: var(--text); }
618
+body.chat #chat-buttons-wrapper > #chat-button-submit { background: var(--link) !important; border-color: var(--link) !important; min-width: 64px !important; max-width: 64px !important; }
619
+body.chat #chat-buttons-wrapper > #chat-button-submit::after { background-color: var(--on-accent); }
620
+body.chat #chat-buttons-wrapper > #chat-button-submit:hover { background: var(--link-hover) !important; }
621
+body.chat #chat-button-preview { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z%22/%3E%3C/svg%3E"); }
622
+body.chat #chat-button-search { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z%22/%3E%3C/svg%3E"); }
623
+body.chat #chat-button-attach { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z%22/%3E%3C/svg%3E"); }
624
+body.chat #chat-button-settings { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z%22/%3E%3C/svg%3E"); }
625
+body.chat #chat-button-submit { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z%22/%3E%3C/svg%3E"); }
626
+
627
+/* Screen sizes, as in the default skin */
628
+@media screen and (max-width: 600px) {
629
+ body { padding-left: 12px; padding-right: 12px; }
630
+ .content { font-size: 0.95em; }
631
+ header { gap: 10px; padding: 10px 0 8px; }
632
+ div.logo img, img.logo-mark { width: 36px; height: 36px; }
633
+ .title h1, .title .project-name { font-size: 1.5em; }
634
+ .title > .page-title { display: inline; }
635
+ .artifact .title > .page-title, .dir .title > .page-title,
636
+ .doc .title > .page-title, .wiki .title > .page-title { display: none; }
637
+ .mainmenu a { padding: 10px 12px; }
638
+ .mainmenu { padding: 0; }
639
+ nav#hbdrop ul#sitemap, ul#sitemap.columns { columns: 1 !important; column-width: auto !important; }
640
+ .submenu { padding: 6px 0; }
641
+ td.timelineTime { font-size: 0.8em; }
642
+}
643
+@media screen and (min-width: 600px) {
644
+ body { padding-left: 20px; padding-right: 20px; }
645
+ .mainmenu a { padding: 12px 20px; }
646
+ .mainmenu { padding: 0; }
647
+ .content dd, .content dt, .content div, .content li, .content p, .content table { line-height: 1.45em; }
648
+ /* Fossil renders a document's title outside .content. Match its h1 inset. */
649
+ body.doc > h1.page-title {
650
+ box-sizing: border-box;
651
+ width: 100%;
652
+ margin-inline: 0;
653
+ padding-inline: 10pt;
654
+ }
655
+ .doc > .content > p, .doc > .content > .markdown > p, .doc > .content > .fossil-doc > p,
656
+ .doc > .content > ol, .doc > .content > ul, .doc > .content > .markdown > ol, .doc > .content > .markdown > ul,
657
+ .wiki > .content > p, .wiki > .content > .markdown > p, .wiki > .content > .fossil-doc > p,
658
+ .wiki > .content > ol, .wiki > .content > ul, .wiki > .content > .markdown > ol, .wiki > .content > .markdown > ul,
659
+ .artifact > .content > .markdown > p, .artifact > .content > .markdown > ol, .artifact > .content > .markdown > ul,
660
+ .doc > .content > .markdown > table, .wiki > .content > .markdown > table, .artifact > .content > .markdown > table {
661
+ margin-left: 30pt; margin-right: 30pt;
662
+ }
663
+ .doc > .content > pre, .doc > .content > .markdown > pre, .doc > .content > .fossil-doc > pre,
664
+ .wiki > .content > pre, .wiki > .content > .markdown > pre,
665
+ .artifact > .content > .markdown > pre { margin-left: 40pt; margin-right: 30pt; }
666
+ .forum > .content .markdown > pre { margin-left: 20pt; }
667
+ .doc > .content h1, .wiki .content h1, .artifact .content h1 { margin-left: 10pt; }
668
+ .doc > .content h2, .wiki .content h2, .artifact .content h2 { margin-left: 15pt; }
669
+ .doc > .content h3, .wiki .content h3, .artifact .content h3 { margin-left: 20pt; }
670
+ .doc > .content > blockquote, .wiki > .content > blockquote { margin-left: 50pt; }
671
+ .doc > .content > .markdown > blockquote, .wiki > .content > .markdown > blockquote { margin-left: 40pt; }
672
+ .content .pikchr-wrapper, div.pikchr-wrapper.indent:not(.source) { margin-left: 40pt; }
673
+ div.pikchr-wrapper.center:not(.source), div.pikchr-wrapper.float-right:not(.source) { margin-left: 0; }
674
+}
675
+
676
+/* Chat bubbles: messaging-app corners; your own messages, when Fossil puts
677
+ them on the right (its my-messages-right layout, the default in tall
678
+ windows), point the other way */
679
+body.chat .message-widget:not(.notification) .message-widget-content { border-radius: 12px 12px 12px 4px !important; }
680
+body.chat.my-messages-right .message-widget.mine .message-widget-content { border-radius: 12px 12px 4px 12px !important; }
681
+body.chat.my-messages-right .message-widget.mine .message-widget-tab { text-align: right; }
682
+
683
+/* Message options popup (click a message's header): one card, quiet
684
+ timestamps, buttons sized for touch */
685
+body.chat .chat-message-popup {
686
+ font-family: var(--font) !important; font-size: 0.9em !important;
687
+ background: var(--surface2) !important; border: 1px solid var(--border) !important;
688
+ border-radius: 10px !important; padding: 0.65em !important; gap: 0.45em;
689
+ box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / var(--popup-shadow)) !important;
690
+ max-width: min(26rem, calc(100vw - 2rem));
691
+}
692
+body.chat .chat-message-popup > span { font-family: var(--mono); font-size: 0.85em; color: var(--muted); white-space: normal; }
693
+body.chat .chat-message-popup > .toolbar { border: none !important; gap: 0.4em; margin: 0 !important; flex-wrap: wrap; }
694
+body.chat .chat-message-popup > .toolbar > * { margin: 0 !important; }
695
+body.chat .chat-message-popup > .toolbar > button,
696
+body.chat .chat-message-popup > .toolbar > a {
697
+ flex: 1 1 auto; min-height: 36px; display: inline-flex; align-items: center; justify-content: center;
698
+ padding: 0.35em 0.8em; border: 1px solid var(--border); border-radius: 6px;
699
+ background: var(--surface); color: var(--text); font-family: var(--font); font-size: 1em; text-decoration: none;
700
+}
701
+body.chat .chat-message-popup > .toolbar > a { color: var(--link); }
702
+body.chat .chat-message-popup > .toolbar > button:hover,
703
+body.chat .chat-message-popup > .toolbar > a:hover { background: var(--btn-hover); border-color: var(--muted); text-decoration: none; }
704
+/* "Delete globally" removes the message for everyone */
705
+body.chat .chat-message-popup > div.toolbar:nth-of-type(1) > button:nth-child(2) { color: var(--red); }
706
+@media (pointer: coarse), (max-width: 600px) {
707
+ body.chat .chat-message-popup > .toolbar > button,
708
+ body.chat .chat-message-popup > .toolbar > a { min-height: 44px; }
709
+}
710
+
711
+/* Phones: the page itself never scrolls sideways */
712
+body.chat .chat-message-popup { z-index: 200 !important; }
713
+@media screen and (max-width: 600px) {
714
+ table.label-value td { white-space: normal !important; overflow-wrap: anywhere; }
715
+ table.label-value td .nobr, table.label-value td .nobr *,
716
+ td.tktDspValue .nobr, td.tktDspValue .nobr * { white-space: normal !important; word-break: break-all; }
717
+ .content table.sortable, .content table.report, .content table.userTable {
718
+ display: block; max-width: 100%; overflow-x: auto;
719
+ }
720
+ .title h1, .title .project-name { font-size: 1.3em; }
721
+}
722
+
723
+/* Hamburger menu. hbmenu.js toggles it instantly (data-anim-ms="0" in the
724
+ header); the skin slides it in. */
725
+@keyframes hb-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
726
+nav#hbdrop { animation: hb-in 160ms ease-out; top: var(--nav-bottom, 88px); }
727
+@media screen and (max-width: 600px), (pointer: coarse) {
728
+ /* A sheet from under the nav bar to the bottom of the screen, scrolling
729
+ on its own, with the page behind it held still */
730
+ nav#hbdrop {
731
+ bottom: 0; max-height: none; border-radius: 0; border-left: 0; border-right: 0;
732
+ overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
733
+ }
734
+ html:has(#hbdrop[style*="display: block"]) { overflow: hidden; }
735
+ /* Keep the nav bar, and its close button, on screen while the menu is open */
736
+ html:has(#hbdrop[style*="display: block"]) nav.mainmenu { position: sticky; top: 0; }
737
+ ul#sitemap ul li a { min-height: 44px; display: flex; align-items: center; }
738
+}
739
+@media (prefers-reduced-motion: reduce) { nav#hbdrop { animation: none; } }
740
+
741
+/* Menu bar: every item carries the 2px underline slot, transparent until
742
+ hover or active, so highlighting never changes any item's or the bar's height */
743
+.mainmenu a { border-bottom: 2px solid transparent; }
744
+.mainmenu a.active, .mainmenu a:hover { border-bottom-color: var(--active); }
745
+#hbbtn { line-height: 1.4; font-size: 1em; }
746
+
747
+/* Logo: show any repository's logo whole in the same 48px box (36px on
748
+ phones); a square logo looks exactly as before */
749
+div.logo img, img.logo-mark { object-fit: contain; }
750
+
751
+/* Menu bar as a flex row: the whitespace between items in the header no
752
+ longer leaves 4px gaps, so each underline meets the divider beside it */
753
+.mainmenu { display: flex; }
754
+.mainmenu a { flex: 0 0 auto; }
755
+
756
+/* Weekday above each timeline date. The line is reserved here, before any
757
+ script runs, so the rows already have their final height when Fossil
758
+ draws the timeline graph; a11y.js only fills in the name through
759
+ data-dow. (Inserting a line afterwards moved every row, and Fossil
760
+ redrew the graph a second later, so the nodes jumped.) */
761
+div.timelineDate::before {
762
+ content: attr(data-dow); display: block; min-height: 1.2em;
763
+ font-size: 0.8em; font-weight: 400; opacity: 0.85; line-height: 1.2; margin-bottom: 0.1em;
764
+}
765
+
766
+
767
+/* The chat's "Load..." bar: a small label over one row of buttons, without
768
+ the box Fossil's fieldset would draw around them */
769
+body.chat fieldset#load-msg-toolbar {
770
+ border: none !important; background: transparent !important;
771
+ padding: 0.5em 0 0 !important; margin: 0 0 1em !important;
772
+}
773
+body.chat #load-msg-toolbar > legend { font-size: 0.85em; color: var(--muted); padding: 0 0 0.35em; }
774
+body.chat #load-msg-toolbar > div { gap: 0.5em; }
775
+body.chat #load-msg-toolbar > div > button { border-radius: 6px; }
776
+
777
+
778
+/* ── Fixes from the page-by-page audit ─────────────────────────────────── */
779
+
780
+/* Fields Fossil emits with no type, or type="input" (forum title, ticket
781
+ e-mail), which the input[type=text] rule above does not match */
782
+input:not([type]), input[type=input] {
783
+ background: var(--input-bg); border: 1px solid var(--border); border-radius: 4px;
784
+ color: var(--text); font-family: var(--font); font-size: 1em; padding: 0.35em 0.6em;
785
+}
786
+input[type=file]::file-selector-button {
787
+ background: var(--surface2); border: 1px solid var(--border); border-radius: 4px;
788
+ color: var(--text); font-family: var(--font); font-size: 0.95em; padding: 0.35em 0.8em;
789
+ margin-right: 0.6em; cursor: pointer;
790
+}
791
+input[type=file]::file-selector-button:hover { background: var(--btn-hover); border-color: var(--muted); }
792
+
793
+/* Forum subjects may shrink below a long word on narrow screens. */
794
+@media screen and (max-width: 600px) {
795
+ body.forum td.subject { overflow-wrap: anywhere; }
796
+}
797
+
798
+/* Long hashes in titles and headings wrap instead of widening the page */
799
+.title, span.page-title, .content h1, .content h2, .content h3 { overflow-wrap: anywhere; }
800
+.title { min-width: 0; }
801
+.content :not(pre) > code { overflow-wrap: break-word; }
802
+.markdown p, .markdown li { overflow-wrap: break-word; }
803
+
804
+/* Rendered markdown looks the same wherever it appears (the wiki editor's
805
+ preview nests it deeper than the page does) */
806
+.markdown pre {
807
+ background-color: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px;
808
+}
809
+.markdown p > code, .markdown li > code, .markdown td > code {
810
+ background-color: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px;
811
+}
812
+
813
+/* Chat: a bubble holding an attachment stays inside its column */
814
+body.chat .message-widget-content { box-sizing: border-box; max-width: 100%; }
815
+body.chat .chat-message-popup > .toolbar { align-items: stretch; }
816
+body.chat .chat-message-popup > .toolbar > a { display: inline-flex; align-items: center; }
817
+
818
+/* Activity-report charts: a11y.js gives them a viewBox so they can shrink */
819
+.content svg.fit { max-width: 100%; height: auto; }
820
+
821
+/* Contrast: links on Fossil's colored rows, closed tickets in the timeline,
822
+ the fourth capability marker */
823
+body.report table.report tr[style*="background-color"] a,
824
+table.timelineTable td[style*="background"] a { color: var(--link-on-tint) !important; }
825
+td.tktTlClosed { color: var(--muted); }
826
+span.ueditInheritNobody { color: var(--green) !important; }
827
+
828
+/* Ticket view: a label alone in its row ("Description:") sits at the left,
829
+ like "User Comments:" below it */
830
+td.tktDspLabel:only-child { text-align: left; }
831
+
832
+/* Bare <table border="1"> (user categories, unversioned files) */
833
+.content table[border="1"] { border-collapse: collapse; border-color: var(--border); }
834
+.content table[border="1"] > * > tr > td, .content table[border="1"] > * > tr > th { border: 1px solid var(--border); padding: 4px 8px; }
835
+
836
+/* Lists Fossil marks list-style:none keep no bullets */
837
+.content ul[style*="list-style"] > li { list-style-type: inherit; }
838
+
839
+/* Main menu: the full bar on every screen. The menu button stays pinned at
840
+ the left while the entries scroll sideways beneath it, and a fade at the
841
+ right edge shows there is more. (Fossil would hide entries marked
842
+ desktoponly / wideonly on small screens; the display set on ".mainmenu a"
843
+ above keeps them, on purpose.) */
844
+#hbbtn {
845
+ position: sticky; left: 0; z-index: 2;
846
+ background: var(--surface) linear-gradient(var(--band-top), var(--surface));
847
+}
848
+.mainmenu::after {
849
+ content: ""; flex: 0 0 28px; position: sticky; right: 0; pointer-events: none;
850
+ background: var(--surface) linear-gradient(var(--band-top), var(--surface));
851
+ -webkit-mask-image: linear-gradient(to right, transparent, #000 85%); mask-image: linear-gradient(to right, transparent, #000 85%);
852
+}
853
+
854
+/* Phone menu sheet: top-level entries are destinations, so they read as
855
+ links in 44px rows */
856
+@media screen and (max-width: 600px), (pointer: coarse) {
857
+ ul#sitemap { padding: 0.5rem 1rem 1.5rem; }
858
+ ul#sitemap > li { margin: 0; border-bottom: 1px solid var(--rule); }
859
+ ul#sitemap > li > a {
860
+ display: flex; align-items: center; min-height: 44px; box-sizing: border-box;
861
+ font-size: 1em; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text);
862
+ }
863
+ ul#sitemap ul { margin: 0 0 0.4rem; }
864
+ ul#sitemap ul li a { box-sizing: border-box; min-height: 44px; padding-left: 1rem; color: var(--link); }
865
+
866
+ /* Touch targets */
867
+ .submenu a, .submenu label, .sectionmenu a { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }
868
+ input[type=text], input[type=password], input[type=email], input[type=search], input[type=number],
869
+ input:not([type]), input[type=input], select, input[type=submit], input[type=button], button {
870
+ min-height: 44px; box-sizing: border-box;
871
+ }
872
+ input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
873
+}
874
+
875
+@media screen and (max-width: 600px) {
876
+ /* A long unbroken word in a timeline row (a mirrored e-mail address as the
877
+ login, a path in the comment) wraps instead of widening the page */
878
+ table.timelineTable td.timelineModernCell, table.timelineTable td.timelineDetailCell,
879
+ .timelineModernComment, .timelineModernDetail,
880
+ .content table.timelineTable td.timelineModernCell * { overflow-wrap: anywhere; }
881
+
882
+ /* Forms and their fields never exceed the screen */
883
+ .content form { max-width: 100%; }
884
+ .content textarea, .content input:not([type=checkbox]):not([type=radio]), .content select { max-width: 100%; box-sizing: border-box; }
885
+ body.forum .content form { display: block; }
886
+
887
+ /* Markdown tables scroll inside themselves, like sortable tables */
888
+ .content table.md-table, .markdown table { display: block; max-width: 100%; overflow-x: auto; }
889
+
890
+ /* Ticket reports: one line per row inside the scrolling table */
891
+ .content table.report td { white-space: nowrap; }
892
+ .content table.report td:last-child { white-space: normal; min-width: 12em; max-width: 18em; }
893
+
894
+ /* Tickets: Fossil's label | value tables become label above value */
895
+ body.tkt .content form > table, body.tkt .content > table[cellpadding],
896
+ body.tkt .content form > table > tbody, body.tkt .content > table[cellpadding] > tbody,
897
+ body.tkt .content form > table > tbody > tr, body.tkt .content > table[cellpadding] > tbody > tr { display: block; }
898
+ body.tkt .content form > table > tbody > tr > td, body.tkt .content > table[cellpadding] > tbody > tr > td {
899
+ display: block; width: auto; text-align: left; padding: 2px 0;
900
+ }
901
+ body.tkt .content > table[cellpadding] > tbody > tr > td.tktDspLabel { padding: 12px 0 3px; font-size: 0.9em; color: var(--muted); }
902
+ body.tkt .content > table[cellpadding] > tbody > tr > td.tktDspValue { padding: 6px 10px; border-radius: 4px; min-height: 1.4em; overflow-wrap: anywhere; }
903
+ body.tkt .content form > table > tbody > tr > td:nth-child(3) { color: var(--muted); font-size: 0.9em; }
904
+ body.tkt .content form > table > tbody > tr > td[align=right] { padding-top: 12px; color: var(--muted); }
905
+
906
+ /* File ages: age and file on one line, the check-in below */
907
+ body.fileage .content table:not(.timelineTable), body.fileage .content table:not(.timelineTable) > * { display: block; }
908
+ body.fileage .content table:not(.timelineTable) tr { display: grid; grid-template-columns: 6.5em 1fr; border-bottom: 1px solid var(--rule); }
909
+ body.fileage .content table:not(.timelineTable) td { border: 0; overflow-wrap: anywhere; }
910
+ body.fileage .content table:not(.timelineTable) td:nth-child(3), body.fileage .content table:not(.timelineTable) th:nth-child(3) {
911
+ grid-column: 1 / -1; max-width: none; padding-top: 0; color: var(--muted); font-size: 0.9em;
912
+ }
913
+
914
+ /* Admin forms: tables that hold fields stack their cells */
915
+ body.setup .content table:not(.sortable):not([border]):has(input, textarea, select),
916
+ body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody,
917
+ body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody > tr,
918
+ body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody > tr > td {
919
+ display: block; width: auto; max-width: 100%; text-align: left;
920
+ }
921
+ body.setup .content textarea { width: 100%; }
922
+ body.setup .content label { white-space: normal; }
923
+
924
+ /* Other wide admin tables scroll inside themselves; long option lists wrap */
925
+ .content table#capabilitySummary, .cpage-rcvfromlist .content > table { display: block; max-width: 100%; overflow-x: auto; }
926
+ .content tt, .cpage-secaudit0 .content li { overflow-wrap: anywhere; }
927
+
928
+ /* Forum replies: 10px a level instead of Fossil's 4ex, so deep threads keep
929
+ their shape and their width. Every level up to ten stays distinct. */
930
+ div.forumTime[style*="margin-left:"] { margin-left: 100px !important; }
931
+ div.forumTime[style*="left:4ex"] { margin-left: 10px !important; }
932
+ div.forumTime[style*="left:8ex"] { margin-left: 20px !important; }
933
+ div.forumTime[style*="left:12ex"] { margin-left: 30px !important; }
934
+ div.forumTime[style*="left:16ex"] { margin-left: 40px !important; }
935
+ div.forumTime[style*="left:20ex"] { margin-left: 50px !important; }
936
+ div.forumTime[style*="left:24ex"] { margin-left: 60px !important; }
937
+ div.forumTime[style*="left:28ex"] { margin-left: 70px !important; }
938
+ div.forumTime[style*="left:32ex"] { margin-left: 80px !important; }
939
+ div.forumTime[style*="left:36ex"] { margin-left: 90px !important; }
940
+ div.forumTime[style*="left:40ex"] { margin-left: 100px !important; }
941
+}
942
+
943
+/* Windows between phone and desktop width (a half-screen browser, a tablet):
944
+ the page never scrolls sideways there either. The same measures as on
945
+ phones, without the phone-only layout changes. */
946
+@media screen and (min-width: 601px) and (max-width: 1100px) {
947
+ table.label-value td { white-space: normal !important; overflow-wrap: anywhere; }
948
+ table.label-value td .nobr, table.label-value td .nobr *,
949
+ td.tktDspValue .nobr, td.tktDspValue .nobr * { white-space: normal !important; word-break: break-all; }
950
+ .content table.sortable, .content table.report, .content table.userTable, .content table.md-table, .markdown table,
951
+ .content table#capabilitySummary, .cpage-rcvfromlist .content > table {
952
+ display: block; max-width: 100%; overflow-x: auto;
953
+ }
954
+ .content form { max-width: 100%; }
955
+ .content textarea, .content input:not([type=checkbox]):not([type=radio]), .content select { max-width: 100%; box-sizing: border-box; }
956
+ body.forum .content form { display: block; }
957
+ .content tt, .cpage-secaudit0 .content li { overflow-wrap: anywhere; }
958
+ /* Ticket forms: label above field, as on phones */
959
+ body.tkt .content form > table, body.tkt .content form > table > tbody,
960
+ body.tkt .content form > table > tbody > tr { display: block; }
961
+ body.tkt .content form > table > tbody > tr > td { display: block; width: auto; text-align: left; padding: 2px 0; }
962
+ body.tkt .content form > table > tbody > tr > td:nth-child(3) { color: var(--muted); font-size: 0.9em; }
963
+ body.tkt .content form > table > tbody > tr > td[align=right] { padding-top: 12px; color: var(--muted); }
964
+}
965
+
966
+/* A long unbroken word in any timeline entry (a wiki page named after a
967
+ full hash, a path, an e-mail address as login) wraps at every width */
968
+.content table.timelineTable td[class$="Cell"], .content table.timelineTable td[class$="Cell"] *,
969
+.content table.timelineTable span[class*="Comment"], .content table.timelineTable span[class*="Comment"] *,
970
+.content table.timelineTable span[class*="Detail"], .content table.timelineTable span[class*="Detail"] * { overflow-wrap: anywhere; }
971
+
972
+/* Login page on phones: fields stack under their labels, and the anonymous
973
+ login's ASCII-art captcha scrolls inside its own box */
974
+@media screen and (max-width: 600px) {
975
+ table.login_out, table.login_out > tbody, table.login_out > tbody > tr,
976
+ table.login_out > tbody > tr > td { display: block; width: auto; text-align: left; }
977
+ table.login_out input[type=text], table.login_out input[type=password] { width: 100%; box-sizing: border-box; }
978
+ .content table.captcha, .content div.captcha { display: block; max-width: 100%; overflow-x: auto; }
979
+}
980
+
981
+/* Long branch names and "merged into" notes wrap instead of widening the page */
982
+body.branch .brlist > table td:first-child, body.branch .brlist > table td:last-child {
983
+ white-space: normal; overflow-wrap: anywhere;
984
+}
985
+/* Submenu drop-downs never grow wider than the screen */
986
+span.submenuctrl { max-width: 100%; min-width: 0; }
987
+.submenu select, .sectionmenu select { max-width: 100%; min-width: 0; }
988
+/* Long file names, search snippets, login notes and help options wrap */
989
+ul.browser a, .content .snippet, body.rpage-search .content li,
990
+body.login .content p, dl.helpOptions dt, dl.helpOptions dd { overflow-wrap: anywhere; }
991
+/* Fossil sizes the file browser's columns from the longest name and keeps
992
+ names on one line. On phones use one column and let a long name wrap. */
993
+@media screen and (max-width: 600px) {
994
+ .content div.columns { columns: auto 1 !important; }
995
+ .content ul.browser { white-space: normal; }
996
+}
997
+
998
+/* A message's header line (sender, number, time) may wrap. Fossil keeps it
999
+ on one line, so a long login made the message list scroll sideways. */
1000
+body.chat div.message-widget .message-widget-tab { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
--- a/skins/refined-light/css.txt
+++ b/skins/refined-light/css.txt
@@ -0,0 +1,1000 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/refined-light/css.txt
+++ b/skins/refined-light/css.txt
@@ -0,0 +1,1000 @@
1 /* Refined Light skin
2 A light rendering of Fossil's default skin: same layout, same sizes, same
3 menu band and submenu row. Colors are chosen for WCAG AA contrast on a
4 near-black page: body text 13:1, muted text 7:1, links 7:1.
5 Functional dark-theme overrides for Fossil's hardcoded light colors
6 (timeline graph, diffs, chat, forum, tickets) are kept at the end.
7 Uses system fonts; no external font resources are needed. */
8
9
10 :root {
11 --bg: #ffffff;
12 --surface: #f4f5f7;
13 --surface2: #e8ebef;
14 --border: #d3d7dd;
15 --text: #1c1e22; /* 16:1 on --bg */
16 --muted: #565e68; /* 6.6:1 on --bg */
17 --link: #2b67a8; /* 5.8:1 on --bg; near Fossil default's #3779BF */
18 --link-hover: #1d4f86;
19 --link-on-tint: #1d4f86; /* 5.0-6.4:1 on Fossil's pastel rows */
20 --title: #3a7bc0; /* large text; Fossil default's #4183C4 */
21 --active: #d26911; /* Fossil default's menu accent */
22 --green: #1d7a3c;
23 --red: #b3372a;
24 --yellow: #8a6100;
25 --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
26 --mono: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
27 color-scheme: light;
28 --input-bg: #ffffff; --on-accent: #ffffff; --visited: #5a4fa8;
29 --sel-bg: #f7e3cc; --sec-bg: #d9e7f6; --stripe: #f7f8fa; --rule: #e5e8ec;
30 --btn-hover: #dde1e6; --band-top: #fafbfc; --warn-bg: #fbf0d0; --err-bg: #fbe1dc;
31 --green-rgb: 29 122 60; --red-rgb: 179 55 42; --yellow-rgb: 190 140 0;
32 --link-rgb: 43 103 168; --teal-rgb: 20 140 130; --violet-rgb: 90 90 200;
33 --muted-rgb: 86 94 104; --veil-rgb: 255 255 255; --lift-rgb: 0 0 0; --shadow-rgb: 0 0 0;
34 --tint-rgb: 255 255 255; --tint-mute: 0; --chat-mute: 0; --bubble-shadow: 0.10; --popup-shadow: 0.16;
35 --veil: 0;
36 }
37
38 /* Base, matching the default skin's sizing */
39 body {
40 box-sizing: border-box;
41 min-height: 100vh;
42 min-height: 100dvh;
43 display: flex;
44 flex-direction: column;
45 margin: 0 auto;
46 background-color: var(--bg);
47 color: var(--text);
48 font-family: var(--font);
49 font-size: 16px;
50 line-height: 1.45;
51 }
52 a { color: var(--link); text-decoration: none; }
53 a:hover { color: var(--link-hover); text-decoration: underline; }
54 a:visited { color: var(--visited); }
55 code, pre, tt, kbd, samp, var { font-family: var(--mono); }
56 code, tt, kbd, samp { font-size: 0.94em; }
57 pre { font-size: 0.92em; line-height: 1.35; overflow-x: auto; }
58 hr { border: none; border-top: 1px solid var(--border); }
59 blockquote { border-left: 3px solid var(--border); margin: 0.5em 0; padding: 0.1em 1em; }
60 img { max-width: 100%; }
61
62 /* Title area above the menu bar */
63 header { display: flex; align-items: center; gap: 14px; padding: 14px 0 12px; }
64 .skip-nav {
65 position: absolute; top: -100%; left: 0;
66 background: var(--link); color: var(--on-accent);
67 padding: 0.5rem 1.25rem; font-weight: 600; z-index: 9999;
68 border-radius: 0 0 6px 0;
69 }
70 .skip-nav:focus { top: 0; outline: 2px solid #fff; outline-offset: -4px; }
71
72 div.logo { display: flex; flex-shrink: 0; }
73 div.logo img, img.logo-mark { width: 48px; height: 48px; object-fit: cover; display: block; border-radius: 6px; }
74 .hub-link:hover img { opacity: 0.85; }
75
76 .title { min-width: 0; color: var(--title); line-height: 1.2; }
77 .title h1, .title .project-name {
78 display: inline;
79 font-size: 2.2em;
80 font-weight: bold;
81 color: var(--title);
82 text-decoration: none;
83 }
84 .title .project-name:hover { color: var(--link-hover); text-decoration: none; }
85 .title h1:after, .title .project-name:after {
86 content: " / "; color: var(--muted); font-weight: normal;
87 }
88 span.page-title { font-size: 18px; color: var(--text); }
89 /* Hidden from view but not display:none: Fossil's forum script sizes its
90 expand control from the height of the first h1 on the page, and loops
91 forever if that height is 0. This also keeps the heading for screen readers. */
92 h1.page-title {
93 font-size: 1.6em; color: var(--text);
94 display: block; position: absolute; width: 1px; margin: 0; padding: 0;
95 overflow: hidden; clip-path: inset(50%); white-space: nowrap;
96 }
97 /* Home pages carry their own heading; Fossil's "index" / "Home" title is noise */
98 h1.page-title.home-title { display: none !important; }
99 /* Long document titles go in the body instead of the title bar */
100 .artifact h1.page-title, .dir h1.page-title, .doc h1.page-title, .wiki h1.page-title {
101 position: static; width: auto; overflow: visible; clip-path: none; white-space: normal;
102 margin: revert; margin-bottom: 0;
103 }
104 .artifact .title > .page-title, .dir .title > .page-title,
105 .doc .title > .page-title, .wiki .title > .page-title { display: none; }
106 /* ...unless the page opens with a heading of its own (a wiki page's first
107 heading, "History of ...", "Files in ..."): the title would say it twice */
108 body:has(div.content > :is(h1, h2):first-child, div.content > span:first-child + :is(h1, h2),
109 div.content > :is(.markdown, .fossil-doc) > :is(h1, h2):first-child,
110 div.content > span:first-child + :is(.markdown, .fossil-doc) > :is(h1, h2):first-child) h1.page-title {
111 position: absolute; width: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
112 }
113 .artifact .title h1:after, .dir .title h1:after, .doc .title h1:after, .wiki .title h1:after,
114 .artifact .title .project-name:after, .dir .title .project-name:after,
115 .doc .title .project-name:after, .wiki .title .project-name:after { content: ""; }
116
117 .status { margin-left: auto; font-size: 0.9em; }
118 .status a { color: var(--muted); }
119 .status a:hover { color: var(--text); }
120
121 /* Main menu band */
122 .mainmenu {
123 clear: both;
124 background: var(--surface) linear-gradient(var(--band-top), var(--surface)) repeat-x;
125 border: 1px solid var(--border);
126 border-radius: 5px;
127 overflow-x: auto;
128 overflow-y: hidden;
129 white-space: nowrap;
130 z-index: 21;
131 }
132 .mainmenu a {
133 display: inline-block;
134 line-height: 1.4;
135 color: var(--muted);
136 text-decoration: none;
137 border-right: 1px solid var(--border);
138 font-weight: 500;
139 }
140 .mainmenu a.active, .mainmenu a:hover {
141 color: var(--text);
142 border-bottom: 2px solid var(--active);
143 text-decoration: none;
144 }
145 #hbbtn { font-size: 1.15em; min-width: 44px; text-align: center; }
146 #hbbtn[aria-expanded="true"] { color: var(--text); background: var(--surface2); }
147
148 /* Hamburger dropdown (hbmenu.js toggles display; a11y.js sets --nav-bottom) */
149 nav#hbdrop {
150 background-color: var(--surface);
151 border: 1px solid var(--border);
152 border-top: none;
153 border-radius: 0 0 0.5em 0.5em;
154 display: none;
155 font-size: 0.95em;
156 position: fixed;
157 top: var(--nav-bottom, 88px);
158 left: 0; right: 0;
159 z-index: 200;
160 box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.5);
161 overflow-x: hidden;
162 max-height: 75vh;
163 overflow-y: auto;
164 }
165 ul#sitemap {
166 padding: 1.25rem 1.5rem 1.5rem;
167 margin: 0;
168 list-style: none;
169 column-width: 14em;
170 column-gap: 2.5rem;
171 }
172 ul#sitemap > li {
173 list-style: none;
174 margin: 0 0 1.1rem;
175 break-inside: avoid;
176 }
177 ul#sitemap > li > a {
178 display: inline-block;
179 font-size: 0.78em;
180 font-weight: 600;
181 letter-spacing: 0.06em;
182 text-transform: uppercase;
183 color: var(--muted);
184 padding: 0.3rem 0;
185 }
186 ul#sitemap > li > a:hover { color: var(--text); text-decoration: none; }
187 ul#sitemap ul { margin: 0.15rem 0 0; padding: 0; list-style: none; }
188 ul#sitemap ul li { list-style: none; }
189 ul#sitemap ul li a {
190 display: flex; align-items: center; box-sizing: border-box; /* text stays centered at any row height */
191 color: var(--text);
192 padding: 0.3rem 0.6rem;
193 margin-left: -0.6rem;
194 border-radius: 4px;
195 min-height: 36px;
196 }
197 ul#sitemap ul li a:hover { background: var(--surface2); color: var(--link-hover); text-decoration: none; }
198 nav#hbdrop ul#sitemap { column-width: 14em; }
199 ul#sitemap.columns { overflow-x: hidden; }
200
201 /* Submenu row, like the default: a horizontal strip under the menu band */
202 .submenu, .sectionmenu {
203 font-size: 0.9em;
204 padding: 8px 0;
205 margin-bottom: 4px;
206 border-bottom: 1px solid var(--border);
207 display: flex;
208 flex-wrap: wrap;
209 align-items: center;
210 gap: 0.25rem 0.5rem;
211 }
212 .submenu a, .submenu label, .sectionmenu a {
213 padding: 6px 10px;
214 text-decoration: none;
215 color: var(--link);
216 border: 1px solid transparent;
217 border-radius: 5px;
218 white-space: nowrap;
219 }
220 .submenu > a:first-child { margin-left: -10px; }
221 .submenu a:hover, .submenu label:hover, .sectionmenu a:hover {
222 border-color: var(--border);
223 background: var(--surface);
224 color: var(--text);
225 text-decoration: none;
226 }
227 span.submenuctrl, span.submenuctrl input, select.submenuctrl { color: var(--muted); }
228 span.submenuctrl { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem; }
229 .submenuckbox { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text); cursor: pointer; }
230 .submenu select, .submenu input[type=text], .sectionmenu select, .sectionmenu input[type=text] {
231 width: auto;
232 font-size: 0.95em;
233 padding: 0.3em 0.5em;
234 }
235 .submenu select, .sectionmenu select { padding-right: 1.9em; }
236 .section {
237 font-size: 1em; font-weight: bold;
238 background-color: var(--surface);
239 border: 1px solid var(--border);
240 border-radius: 3px 3px 0 0;
241 padding: 9px 10px 10px;
242 margin: 10px 0;
243 }
244 .sectionmenu {
245 border: 1px solid var(--border);
246 border-radius: 0 0 3px 3px;
247 border-top: 0;
248 margin-top: -10px;
249 margin-bottom: 10px;
250 }
251
252 /* Content */
253 .content { padding: 12px 0; color: var(--text); }
254 .content h1 { font-size: 1.60em; color: var(--text); }
255 .content h2 { font-size: 1.45em; color: var(--text); }
256 .content h3 { font-size: 1.15em; color: var(--text); }
257 .content h4 { font-size: 1.05em; color: var(--text); }
258 .content h5 { font-size: 1.00em; color: var(--text); }
259 .content pre, table.numbered-lines > tbody > tr { hyphens: none; line-height: 1.3; }
260 .content ul:not(.browser) > li { list-style-type: disc; }
261 div.filetree ul li.dir, div.filetree ul li.subdir, div.filetree ul li.file { list-style-type: none; }
262 th { text-align: left; }
263
264 /* User content: wiki, embedded docs, forum posts */
265 .markdown blockquote, p.blockquote, .sidebar {
266 background-color: var(--surface);
267 border-left: 4px solid var(--link);
268 }
269 div.sidebar { outline: 1em solid var(--bg); }
270 .artifact > .content > p > code, .artifact > .content > .markdown > p > code, .artifact > .content > .fossil-doc > p > code,
271 .dir > .content > p > code, .dir > .content > .markdown > p > code,
272 .doc > .content > p > code, .doc > .content > .markdown > p > code, .doc > .content > .fossil-doc > p > code,
273 .forum > .content .markdown > p > code,
274 .wiki > .content > p > code, .wiki > .content > .markdown > p > code, .wiki > .content > .fossil-doc > p > code,
275 .content li > code, .content td > code {
276 background-color: var(--surface);
277 border: 1px solid var(--border);
278 border-radius: 3px;
279 padding: 0 4px;
280 }
281 .artifact > .content > pre, .artifact > .content > .markdown > pre, .artifact > .content > .fossil-doc > pre,
282 .dir > .content > pre, .dir > .content > .markdown > pre,
283 .doc > .content > pre, .doc > .content > .markdown > pre, .doc > .content > .fossil-doc > pre,
284 .forum > .content .markdown > pre,
285 .wiki > .content > pre, .wiki > .content > .markdown > pre, .wiki > .content > .fossil-doc > pre,
286 pre.verbatim, pre.textPlain {
287 background-color: var(--surface);
288 border: 1px solid var(--border);
289 border-radius: 4px;
290 padding: 8px 10px;
291 }
292 pre.verbatim { white-space: pre-wrap; }
293 .artifact > .content table, .dir > .content table, .doc > .content table, .wiki > .content table,
294 .forum > .content .markdown table {
295 background-color: var(--surface);
296 border: 1px solid var(--border);
297 border-radius: 0.5em;
298 border-spacing: 0;
299 padding: 6px;
300 }
301 .artifact > .content th, .dir > .content th, .doc > .content th, .wiki > .content th,
302 .forum > .content .markdown th {
303 border-bottom: 1px solid var(--border);
304 background-color: var(--surface2);
305 padding: 4px 6px;
306 }
307 .artifact > .content tr:nth-child(odd) td, .dir > .content tr:nth-child(odd) td,
308 .doc > .content tr:nth-child(odd) td, .wiki > .content tr:nth-child(odd) td {
309 background-color: var(--stripe);
310 }
311 .artifact > .content td, .dir > .content td, .doc > .content td, .wiki > .content td,
312 .forum > .content .markdown td { padding: 4px 6px; }
313 textarea.wikiedit { font-size: 1.1em; }
314
315 /* Forms */
316 input[type=text], input[type=password], input[type=email], input[type=search],
317 input[type=number], textarea, select {
318 background: var(--input-bg);
319 border: 1px solid var(--border);
320 border-radius: 4px;
321 color: var(--text);
322 font-family: var(--font);
323 font-size: 1em;
324 padding: 0.35em 0.6em;
325 }
326 textarea { font-family: var(--mono); }
327 select {
328 appearance: none;
329 -webkit-appearance: none;
330 padding-right: 2em;
331 line-height: 1.3;
332 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23565e68' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
333 background-repeat: no-repeat;
334 background-position: right 0.6em center;
335 background-size: 12px;
336 cursor: pointer;
337 }
338 select:hover { border-color: var(--muted); }
339 select option { background: var(--input-bg); color: var(--text); }
340 input:focus, textarea:focus, select:focus { border-color: var(--link); outline: none; }
341 input[type=submit], input[type=button], button {
342 background: var(--surface2);
343 border: 1px solid var(--border);
344 border-radius: 4px;
345 color: var(--text);
346 cursor: pointer;
347 font-family: var(--font);
348 font-size: 1em;
349 padding: 0.35em 1em;
350 }
351 input[type=submit]:hover, input[type=button]:hover, button:hover {
352 border-color: var(--muted);
353 background: var(--btn-hover);
354 }
355 input[type=submit]:disabled, input[type=button]:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; }
356 :focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
357 .mainmenu a:focus-visible { outline-offset: -3px; }
358
359 /* Let short pages fill the viewport without overlaying long content. */
360 body > .content { flex: 1 0 auto; min-width: 0; }
361 body > header, body > nav, body > footer { flex-shrink: 0; }
362
363 /* Footer */
364 footer {
365 border-top: 1px solid var(--border);
366 padding: 10px;
367 font-size: 0.85em;
368 margin-top: 10px;
369 color: var(--muted);
370 display: flex;
371 justify-content: space-between;
372 flex-wrap: wrap;
373 gap: 0.5rem;
374 }
375
376 /* Forum */
377 .forum a:visited { color: var(--visited); }
378 div.forumSel {
379 animation: 1s linear 0s sel-fade;
380 background-color: var(--bg);
381 border-left: 4px solid var(--link);
382 }
383 @keyframes sel-fade { from { background-color: var(--surface2); } to { background-color: var(--bg); } }
384 .forum form input { margin: 0.5em 0; }
385 div.forumTime, div.forumHier, div.forumHierRoot {
386 background: var(--surface) !important;
387 border: 1px solid var(--border) !important;
388 border-radius: 4px;
389 color: var(--text) !important;
390 }
391 div.forumTime.forumSel, div.forumHier.forumSel { border-color: var(--link) !important; }
392 div.forumObs { opacity: 0.75; }
393 div.forumPostBody, div.forumPostBody h1, div.forumPostBody h2, div.forumPostBody h3 { color: var(--text) !important; }
394 .forum-post-collapser {
395 border-color: var(--border) !important;
396 background: var(--surface) !important;
397 color: var(--muted) !important;
398 }
399 .forum-post-collapser:hover { background: var(--surface2) !important; color: var(--text) !important; }
400 div.searchForm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1em 0; }
401
402 /* Tickets and reports */
403 table.report { cursor: auto; border: 1px solid var(--border); border-radius: 0.5em; margin: 1em 0; }
404 .report td, .report th { border: 0; font-size: 0.9em; padding: 8px 10px; }
405 .report th { cursor: pointer; background: var(--surface); }
406 .report thead + tbody tr:hover { background-color: var(--surface2) !important; }
407 body.report table.report tr td { color: var(--text) !important; }
408 body.report table.report a { color: var(--link) !important; }
409 td.tktDspLabel { width: 70px; text-align: right; overflow: hidden; color: var(--muted) !important; }
410 td.tktDspValue {
411 text-align: left; vertical-align: top;
412 background-color: var(--surface) !important;
413 border: 1px solid var(--border) !important;
414 color: var(--text) !important;
415 }
416 td.tktDspValue pre { white-space: pre-wrap; }
417
418 /* Timeline */
419 span.timelineDetail { font-size: 90%; }
420 div.timelineDate { font-weight: bold; white-space: nowrap; color: var(--muted); }
421 table.timelineTable { padding: 0 3px; }
422 table.timelineTable tr { border-radius: 1em; }
423 .timelineModernCell, .timelineColumnarCell, .timelineDetailCell { border-radius: 0.5em; }
424 .timelineModernCell[id], .timelineColumnarCell[id], .timelineDetailCell[id] { background-color: var(--surface); }
425 .timelineModernDetail { opacity: 1; color: var(--muted); font-size: 0.9em; }
426 .timelineModernComment { color: var(--text); }
427 td.timelineTime { color: var(--muted); font-family: var(--mono); font-size: 0.9em; white-space: nowrap; }
428 span.timelineHash { font-family: var(--mono); }
429 tr.timelineSelected, tr.timelineSecondary { background-color: unset; }
430 tr.timelineSelected td, span.timelineSelected { background-color: var(--sel-bg) !important; }
431 tr.timelineSecondary td, span.timelineSecondary { background-color: var(--sec-bg) !important; }
432 tr.timelineCurrent td:first-child, tr.timelineSecondary td:first-child, tr.timelineSelected td:first-child {
433 border-top-left-radius: 1em; border-bottom-left-radius: 1em;
434 }
435 tr.timelineCurrent td:last-child, tr.timelineSecondary td:last-child, tr.timelineSelected td:last-child {
436 border-top-right-radius: 1em; border-bottom-right-radius: 1em;
437 }
438 tr.timelineCurrent td { border-top: 1px dashed var(--muted); border-bottom: 1px dashed var(--muted); }
439 tr.timelineCurrent td:first-child { border-left: 1px dashed var(--muted); }
440 tr.timelineCurrent td:last-child { border-right: 1px dashed var(--muted); }
441
442 /* Timeline graph: Fossil hardcodes black lines and white nodes */
443 .tl-node { background: var(--link) !important; border-color: var(--text) !important; }
444 .tl-node.leaf:after { background: var(--bg) !important; }
445 .tl-node.closed-leaf svg { color: var(--bg) !important; }
446 .tl-line { background-color: var(--muted); }
447 .tl-line.warp { background: var(--yellow) !important; }
448 .tl-line.cherrypick.h { border-top-color: var(--muted) !important; background: transparent !important; }
449 .tl-line.cherrypick.v, .tl-line.dotted.v { border-left-color: var(--muted) !important; background: transparent !important; }
450 .tl-arrow.u, .tl-arrow.u.sm { border-bottom-color: var(--muted) !important; }
451 .tl-arrow.merge.l, .tl-arrow.cherrypick.l { border-right-color: var(--muted) !important; }
452 .tl-arrow.merge.r, .tl-arrow.cherrypick.r { border-left-color: var(--muted) !important; }
453 .tl-arrow.warp { border-left-color: var(--yellow) !important; }
454 /* Branch colors are pastel inline backgrounds; darken them so text stays readable */
455 /* Branch and user tints come from Fossil, already sized for this foreground */
456 .tl-tooltip {
457 background: var(--surface2) !important; color: var(--text) !important;
458 border-color: var(--border) !important; box-shadow: 0 4px 16px rgb(var(--shadow-rgb) / 0.5) !important;
459 }
460
461 /* Lists and tables Fossil generates */
462 table.sortable th, table.filelistTable th, .fileage th {
463 text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); cursor: pointer;
464 }
465 table.sortable td, table.filelistTable td, .fileage td { padding: 5px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
466 table.sortable tr:hover td, .fileage tr:hover, div.filetreeline:hover { background: var(--surface) !important; }
467 body.branch .brlist > table > tbody > tr:hover:not(.selected) { background: var(--surface) !important; }
468 body.branch .brlist > table > tbody > tr.selected { background: var(--surface2) !important; }
469 .branch-name, span.tagDsp {
470 display: inline-block; background: var(--surface2); border: 1px solid var(--border);
471 border-radius: 3px; color: var(--link); font-family: var(--mono); font-size: 0.85em; padding: 0 0.3em;
472 }
473
474 /* Diffs: Fossil's built-in colors are pale pastels */
475 table.diff { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.9em; }
476 td.difflnc, td.difflna, td.difflnb { color: var(--muted); padding: 0 0.5em; text-align: right; user-select: none; border-right: 1px solid var(--border); }
477 td.difftext { padding: 0 0.5em; white-space: pre; }
478 tr.diffskip, tr.diffskip.jchunk { background: var(--surface) !important; }
479 tr.diffskip > td.chunkctrl .jcbutton { background: var(--surface2) !important; color: var(--muted) !important; border-radius: 3px; }
480 tr.diffskip > td.chunkctrl .jcbutton:hover { color: var(--text) !important; }
481 td.diffmkrl, td.diffmkrr, td.diffmkru { color: var(--muted); }
482 tr.diffadd td { background: rgb(var(--green-rgb) / 0.10); }
483 tr.diffrm td { background: rgb(var(--red-rgb) / 0.10); }
484 tr.diffchng td { background: rgb(var(--yellow-rgb) / 0.07); }
485 span.diffadd { color: var(--green); }
486 span.diffrm { color: var(--red); }
487 span.diffchng { color: var(--yellow); }
488 td.diffln ins, td.difftxt ins, table.diff pre > ins { background-color: rgb(var(--green-rgb) / 0.16) !important; }
489 td.diffln del, td.difftxt del, table.diff pre > del { background-color: rgb(var(--red-rgb) / 0.16) !important; }
490 td.difftxt del > del, table.diff pre > del > del { background-color: rgb(var(--red-rgb) / 0.32) !important; }
491 td.difftxt ins > ins, table.diff pre > ins > ins { background-color: rgb(var(--green-rgb) / 0.32) !important; }
492 td.difftxt del > del.edit, td.difftxt ins > ins.edit,
493 table.diff pre > del > del.edit, table.diff pre > ins > ins.edit { background-color: rgb(var(--link-rgb) / 0.25) !important; }
494
495 /* Annotate / blame: inline pastel backgrounds from Fossil JS */
496 td.annotateDate, td.annotateUser { color: var(--muted); font-family: var(--mono); font-size: 0.85em; padding: 0 0.5em; white-space: nowrap; border-right: 1px solid var(--border); }
497 pre span[style*="background"], li span[style*="background"] {
498 background-image: linear-gradient(rgb(var(--veil-rgb) / 0.7), rgb(var(--veil-rgb) / 0.7)) !important;
499 border-radius: 3px; padding: 0.1em 0.25em;
500 }
501
502 /* Any inline pastel background Fossil emits (ticket reports and their key,
503 ticket pages, annotate legends, branch lists): darken it, keep the hue */
504 tr[style*="background-color"], td[style*="background-color"], th[style*="background-color"],
505 span[style*="background-color"], div[style*="background-color"], p[style*="background-color"] {
506 background-image: linear-gradient(rgb(var(--veil-rgb) / var(--veil, 0.35)), rgb(var(--veil-rgb) / var(--veil, 0.35))) !important;
507 color: var(--text);
508 }
509 tr[style*="background-color"] a, td[style*="background-color"] a, p[style*="background-color"] a { color: var(--link); }
510 p[style*="border:1px solid"] { border-color: var(--border) !important; border-radius: 4px; padding: 0.6em 0.8em; }
511 /* Pikchr: Fossil already draws white defaults because skin-detail is white-foreground; leave diagrams alone */
512
513 /* Fossil's user and branch colors, muted toward the surface so they sit with the skin */
514 table.timelineTable td[style*="background"] {
515 background-image: linear-gradient(rgb(var(--tint-rgb) / var(--tint-mute)), rgb(var(--tint-rgb) / var(--tint-mute))) !important;
516 }
517 body.chat .message-widget-content[style*="background"] {
518 background-image: linear-gradient(rgb(var(--tint-rgb) / var(--chat-mute)), rgb(var(--tint-rgb) / var(--chat-mute))) !important;
519 }
520 body.chat .message-widget-tab[style*="background"] { background-image: none !important; }
521 body.chat .message-widget-content { box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / var(--bubble-shadow)) !important; }
522
523 /* Misc Fossil UI elements with hardcoded light colors */
524 div.debug { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--muted) !important; padding: 0.75rem; }
525 /* Inline debug markers, e.g. "(artifact-NNN)" on forum posts for admins: just quieter text */
526 span.debug { background: none !important; border: none !important; padding: 0 !important; color: var(--muted) !important; font-size: 0.85em; }
527 span.debug a { color: var(--muted); }
528 span.debug a:hover { color: var(--link); }
529 span.error { background: rgb(var(--yellow-rgb) / 0.18) !important; color: var(--yellow) !important; padding: 0.1em 0.25em; border-radius: 3px; }
530 mark { background: rgb(var(--yellow-rgb) / 0.25); color: var(--text); padding: 0.1em 0.25em; border-radius: 3px; }
531 div.sideboxTitle { color: var(--title); font-weight: 600; }
532 div.sidebox { background: var(--surface); border: 1px solid var(--border) !important; border-radius: 4px; margin: 0 0 1em 1.5em; padding: 0.75em; }
533 .disabled { color: var(--red); }
534 .modpending { color: var(--yellow); }
535 .fossil-tooltip.help-buttonlet-content { background-color: var(--surface2); color: var(--text); border: 1px solid var(--border); }
536 .fossil-tooltip { background: var(--surface2) !important; color: var(--text) !important; border-color: var(--border) !important; }
537 td.capsumRead { background: rgb(var(--green-rgb) / 0.15) !important; color: var(--green); }
538 td.capsumWrite { background: rgb(var(--yellow-rgb) / 0.15) !important; color: var(--yellow); }
539 td.capsumOff { background: rgb(var(--muted-rgb) / 0.1) !important; color: var(--muted); }
540 table.login_out { margin: 1em 0; }
541 td.login_out_label { color: var(--muted); padding: 0.4em 0.75em 0.4em 0; }
542 .help-buttonlet { color: var(--link); cursor: pointer; }
543
544 /* Status text Fossil colors pure red / blue / black */
545 span.disabled, span.wikiError, span.loginError, span.tktError, span.brokenlink, span.thTrace,
546 p.generalError, p.tktsetupError, p.xfersetupError, p.thmainError, p.reportError, blockquote.reportError,
547 pre.th1error, span.ueditInheritDeveloper, td.tktTlOpen,
548 div.markdown ol.footnotes > li.fn-misreference > span, div.markdown ol.footnotes > li.fn-unreferenced > code,
549 div.markdown sup.noteref.misref, div.markdown sup.noteref.misref > a { color: var(--red) !important; }
550 span.ueditInheritAnonymous, p.missingPriv, p.noMoreShun, p.shunned { color: var(--link) !important; }
551 span.ueditInheritReader { color: var(--text) !important; }
552 blockquote.reportError, p.generalError { background: rgb(var(--red-rgb) / 0.1); border: 1px solid rgb(var(--red-rgb) / 0.4); border-radius: 4px; padding: 0.6em 0.8em; }
553 /* Fossil also puts class="error" on <body> and colors it yellow; keep the page as it is */
554 body.error, body.warning { background: var(--bg) !important; color: var(--text) !important; }
555 .error:not(body), .warning:not(body) { background: rgb(var(--yellow-rgb) / 0.18) !important; color: var(--yellow) !important; border-radius: 3px; padding: 0.1em 0.3em; }
556 table.numbered-lines td.line-numbers span.selected-line { color: var(--text) !important; background-color: rgb(var(--link-rgb) / 0.22) !important; }
557 .fossil-toast-message { background: var(--surface2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 6px !important; box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.5) !important; }
558 .fossil-toast-message.error, .fossil-toast-message.warning { background: var(--warn-bg) !important; color: var(--yellow) !important; border-color: var(--yellow) !important; }
559 .fossil-toast-message.error { color: var(--red) !important; border-color: var(--red) !important; background: var(--err-bg) !important; }
560
561 /* Wiki / file editor tabs */
562 .tab-container .tab-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--border); }
563 .tab-container .tab-button {
564 padding: 0.4em 0.9em; border: 1px solid transparent; border-bottom: none; border-radius: 5px 5px 0 0;
565 background: transparent; color: var(--muted); font-family: var(--font); font-size: 0.95em; cursor: pointer; margin-bottom: -1px;
566 }
567 .tab-container .tab-button:hover { color: var(--text); background: var(--surface); }
568 .tab-container .tab-button.selected { color: var(--text); background: var(--surface); border-color: var(--border); border-bottom-color: var(--surface); }
569 #fossil-status-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-family: var(--mono); font-size: 0.85em; padding: 0.4em 0.75em; margin: 0.5em 0; }
570 .wikiedit-options, .fileedit-options { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.5em; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 0.5em; }
571 .wikiedit-options .input-with-label, .fileedit-options .input-with-label { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
572 #wikiedit-tab-content textarea, #fileedit-tab-content textarea { min-height: 300px; width: 100%; }
573 .tab-container fieldset { border: 1px solid var(--border); border-radius: 4px; }
574 .tab-container fieldset legend { color: var(--muted); }
575 button.wikiedit-content-reload, button.fileedit-content-reload { min-width: unset !important; max-width: unset !important; }
576
577 /* Chat: Fossil sets inline pastel backgrounds per user */
578 /* Each message keeps the user's color, which Fossil already picks for this
579 skin's foreground (white-foreground); only messages without one get --surface. */
580 body.chat .message-widget-content {
581 background-color: var(--surface); border: 1px solid var(--border) !important;
582 border-radius: 6px !important; color: var(--text) !important; padding: 0.5em 0.75em !important;
583 }
584 body.chat .message-widget-tab { background: transparent !important; color: var(--muted) !important; border: none !important; font-size: 0.9em !important; }
585 body.chat .message-widget-tab[style*="background"] { background-image: none !important; }
586 body.chat .message-widget-tab .xfrom { color: var(--link) !important; font-weight: 600 !important; }
587 body.chat #chat-input-line-wrapper { border: 1px solid var(--border) !important; border-radius: 6px !important; background: var(--input-bg) !important; }
588 body.chat #chat-input-line-wrapper:focus-within { border-color: var(--link) !important; }
589 body.chat .chat-input-field { border: none !important; background: transparent !important; color: var(--text) !important; font-family: var(--font) !important; font-size: 1em !important; }
590 body.chat .cbutton { border: 1px solid var(--border) !important; background: var(--surface) !important; border-radius: 4px !important; }
591 body.chat .cbutton:hover { background: var(--surface2) !important; }
592 body.chat fieldset { border: 1px solid var(--border) !important; border-radius: 4px !important; background: var(--surface) !important; }
593 body.chat .menu-entry { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
594 body.chat .menu-entry:hover, body.chat .menu-entry.parent { background: var(--surface2) !important; }
595 body.chat .message-widget .match { background: rgb(var(--yellow-rgb) / 0.25) !important; color: var(--text) !important; }
596 body.chat .chat-message-popup { background: var(--surface2) !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
597 body.chat .message-widget-content img { max-width: 100% !important; border-radius: 4px !important; }
598
599 /* Chat toolbar: Fossil renders the buttons as emoji; mask them with icons, keep the spans intact */
600 body.chat #chat-buttons-wrapper > .cbutton {
601 position: relative !important;
602 font-size: 0 !important;
603 color: transparent !important;
604 min-width: 44px !important; max-width: 44px !important;
605 min-height: 36px !important; height: 36px !important;
606 background: var(--surface) !important;
607 border: 1px solid var(--border) !important;
608 border-radius: 6px !important;
609 }
610 body.chat #chat-buttons-wrapper > .cbutton::after {
611 content: ""; position: absolute; inset: 0; margin: auto;
612 width: 22px; height: 22px;
613 background-color: var(--muted);
614 -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
615 }
616 body.chat #chat-buttons-wrapper > .cbutton:hover { background: var(--surface2) !important; border-color: var(--muted) !important; }
617 body.chat #chat-buttons-wrapper > .cbutton:hover::after { background-color: var(--text); }
618 body.chat #chat-buttons-wrapper > #chat-button-submit { background: var(--link) !important; border-color: var(--link) !important; min-width: 64px !important; max-width: 64px !important; }
619 body.chat #chat-buttons-wrapper > #chat-button-submit::after { background-color: var(--on-accent); }
620 body.chat #chat-buttons-wrapper > #chat-button-submit:hover { background: var(--link-hover) !important; }
621 body.chat #chat-button-preview { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z%22/%3E%3C/svg%3E"); }
622 body.chat #chat-button-search { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z%22/%3E%3C/svg%3E"); }
623 body.chat #chat-button-attach { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z%22/%3E%3C/svg%3E"); }
624 body.chat #chat-button-settings { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z%22/%3E%3C/svg%3E"); }
625 body.chat #chat-button-submit { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22black%22%3E%3Cpath d=%22M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z%22/%3E%3C/svg%3E"); }
626
627 /* Screen sizes, as in the default skin */
628 @media screen and (max-width: 600px) {
629 body { padding-left: 12px; padding-right: 12px; }
630 .content { font-size: 0.95em; }
631 header { gap: 10px; padding: 10px 0 8px; }
632 div.logo img, img.logo-mark { width: 36px; height: 36px; }
633 .title h1, .title .project-name { font-size: 1.5em; }
634 .title > .page-title { display: inline; }
635 .artifact .title > .page-title, .dir .title > .page-title,
636 .doc .title > .page-title, .wiki .title > .page-title { display: none; }
637 .mainmenu a { padding: 10px 12px; }
638 .mainmenu { padding: 0; }
639 nav#hbdrop ul#sitemap, ul#sitemap.columns { columns: 1 !important; column-width: auto !important; }
640 .submenu { padding: 6px 0; }
641 td.timelineTime { font-size: 0.8em; }
642 }
643 @media screen and (min-width: 600px) {
644 body { padding-left: 20px; padding-right: 20px; }
645 .mainmenu a { padding: 12px 20px; }
646 .mainmenu { padding: 0; }
647 .content dd, .content dt, .content div, .content li, .content p, .content table { line-height: 1.45em; }
648 /* Fossil renders a document's title outside .content. Match its h1 inset. */
649 body.doc > h1.page-title {
650 box-sizing: border-box;
651 width: 100%;
652 margin-inline: 0;
653 padding-inline: 10pt;
654 }
655 .doc > .content > p, .doc > .content > .markdown > p, .doc > .content > .fossil-doc > p,
656 .doc > .content > ol, .doc > .content > ul, .doc > .content > .markdown > ol, .doc > .content > .markdown > ul,
657 .wiki > .content > p, .wiki > .content > .markdown > p, .wiki > .content > .fossil-doc > p,
658 .wiki > .content > ol, .wiki > .content > ul, .wiki > .content > .markdown > ol, .wiki > .content > .markdown > ul,
659 .artifact > .content > .markdown > p, .artifact > .content > .markdown > ol, .artifact > .content > .markdown > ul,
660 .doc > .content > .markdown > table, .wiki > .content > .markdown > table, .artifact > .content > .markdown > table {
661 margin-left: 30pt; margin-right: 30pt;
662 }
663 .doc > .content > pre, .doc > .content > .markdown > pre, .doc > .content > .fossil-doc > pre,
664 .wiki > .content > pre, .wiki > .content > .markdown > pre,
665 .artifact > .content > .markdown > pre { margin-left: 40pt; margin-right: 30pt; }
666 .forum > .content .markdown > pre { margin-left: 20pt; }
667 .doc > .content h1, .wiki .content h1, .artifact .content h1 { margin-left: 10pt; }
668 .doc > .content h2, .wiki .content h2, .artifact .content h2 { margin-left: 15pt; }
669 .doc > .content h3, .wiki .content h3, .artifact .content h3 { margin-left: 20pt; }
670 .doc > .content > blockquote, .wiki > .content > blockquote { margin-left: 50pt; }
671 .doc > .content > .markdown > blockquote, .wiki > .content > .markdown > blockquote { margin-left: 40pt; }
672 .content .pikchr-wrapper, div.pikchr-wrapper.indent:not(.source) { margin-left: 40pt; }
673 div.pikchr-wrapper.center:not(.source), div.pikchr-wrapper.float-right:not(.source) { margin-left: 0; }
674 }
675
676 /* Chat bubbles: messaging-app corners; your own messages, when Fossil puts
677 them on the right (its my-messages-right layout, the default in tall
678 windows), point the other way */
679 body.chat .message-widget:not(.notification) .message-widget-content { border-radius: 12px 12px 12px 4px !important; }
680 body.chat.my-messages-right .message-widget.mine .message-widget-content { border-radius: 12px 12px 4px 12px !important; }
681 body.chat.my-messages-right .message-widget.mine .message-widget-tab { text-align: right; }
682
683 /* Message options popup (click a message's header): one card, quiet
684 timestamps, buttons sized for touch */
685 body.chat .chat-message-popup {
686 font-family: var(--font) !important; font-size: 0.9em !important;
687 background: var(--surface2) !important; border: 1px solid var(--border) !important;
688 border-radius: 10px !important; padding: 0.65em !important; gap: 0.45em;
689 box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / var(--popup-shadow)) !important;
690 max-width: min(26rem, calc(100vw - 2rem));
691 }
692 body.chat .chat-message-popup > span { font-family: var(--mono); font-size: 0.85em; color: var(--muted); white-space: normal; }
693 body.chat .chat-message-popup > .toolbar { border: none !important; gap: 0.4em; margin: 0 !important; flex-wrap: wrap; }
694 body.chat .chat-message-popup > .toolbar > * { margin: 0 !important; }
695 body.chat .chat-message-popup > .toolbar > button,
696 body.chat .chat-message-popup > .toolbar > a {
697 flex: 1 1 auto; min-height: 36px; display: inline-flex; align-items: center; justify-content: center;
698 padding: 0.35em 0.8em; border: 1px solid var(--border); border-radius: 6px;
699 background: var(--surface); color: var(--text); font-family: var(--font); font-size: 1em; text-decoration: none;
700 }
701 body.chat .chat-message-popup > .toolbar > a { color: var(--link); }
702 body.chat .chat-message-popup > .toolbar > button:hover,
703 body.chat .chat-message-popup > .toolbar > a:hover { background: var(--btn-hover); border-color: var(--muted); text-decoration: none; }
704 /* "Delete globally" removes the message for everyone */
705 body.chat .chat-message-popup > div.toolbar:nth-of-type(1) > button:nth-child(2) { color: var(--red); }
706 @media (pointer: coarse), (max-width: 600px) {
707 body.chat .chat-message-popup > .toolbar > button,
708 body.chat .chat-message-popup > .toolbar > a { min-height: 44px; }
709 }
710
711 /* Phones: the page itself never scrolls sideways */
712 body.chat .chat-message-popup { z-index: 200 !important; }
713 @media screen and (max-width: 600px) {
714 table.label-value td { white-space: normal !important; overflow-wrap: anywhere; }
715 table.label-value td .nobr, table.label-value td .nobr *,
716 td.tktDspValue .nobr, td.tktDspValue .nobr * { white-space: normal !important; word-break: break-all; }
717 .content table.sortable, .content table.report, .content table.userTable {
718 display: block; max-width: 100%; overflow-x: auto;
719 }
720 .title h1, .title .project-name { font-size: 1.3em; }
721 }
722
723 /* Hamburger menu. hbmenu.js toggles it instantly (data-anim-ms="0" in the
724 header); the skin slides it in. */
725 @keyframes hb-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
726 nav#hbdrop { animation: hb-in 160ms ease-out; top: var(--nav-bottom, 88px); }
727 @media screen and (max-width: 600px), (pointer: coarse) {
728 /* A sheet from under the nav bar to the bottom of the screen, scrolling
729 on its own, with the page behind it held still */
730 nav#hbdrop {
731 bottom: 0; max-height: none; border-radius: 0; border-left: 0; border-right: 0;
732 overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
733 }
734 html:has(#hbdrop[style*="display: block"]) { overflow: hidden; }
735 /* Keep the nav bar, and its close button, on screen while the menu is open */
736 html:has(#hbdrop[style*="display: block"]) nav.mainmenu { position: sticky; top: 0; }
737 ul#sitemap ul li a { min-height: 44px; display: flex; align-items: center; }
738 }
739 @media (prefers-reduced-motion: reduce) { nav#hbdrop { animation: none; } }
740
741 /* Menu bar: every item carries the 2px underline slot, transparent until
742 hover or active, so highlighting never changes any item's or the bar's height */
743 .mainmenu a { border-bottom: 2px solid transparent; }
744 .mainmenu a.active, .mainmenu a:hover { border-bottom-color: var(--active); }
745 #hbbtn { line-height: 1.4; font-size: 1em; }
746
747 /* Logo: show any repository's logo whole in the same 48px box (36px on
748 phones); a square logo looks exactly as before */
749 div.logo img, img.logo-mark { object-fit: contain; }
750
751 /* Menu bar as a flex row: the whitespace between items in the header no
752 longer leaves 4px gaps, so each underline meets the divider beside it */
753 .mainmenu { display: flex; }
754 .mainmenu a { flex: 0 0 auto; }
755
756 /* Weekday above each timeline date. The line is reserved here, before any
757 script runs, so the rows already have their final height when Fossil
758 draws the timeline graph; a11y.js only fills in the name through
759 data-dow. (Inserting a line afterwards moved every row, and Fossil
760 redrew the graph a second later, so the nodes jumped.) */
761 div.timelineDate::before {
762 content: attr(data-dow); display: block; min-height: 1.2em;
763 font-size: 0.8em; font-weight: 400; opacity: 0.85; line-height: 1.2; margin-bottom: 0.1em;
764 }
765
766
767 /* The chat's "Load..." bar: a small label over one row of buttons, without
768 the box Fossil's fieldset would draw around them */
769 body.chat fieldset#load-msg-toolbar {
770 border: none !important; background: transparent !important;
771 padding: 0.5em 0 0 !important; margin: 0 0 1em !important;
772 }
773 body.chat #load-msg-toolbar > legend { font-size: 0.85em; color: var(--muted); padding: 0 0 0.35em; }
774 body.chat #load-msg-toolbar > div { gap: 0.5em; }
775 body.chat #load-msg-toolbar > div > button { border-radius: 6px; }
776
777
778 /* ── Fixes from the page-by-page audit ─────────────────────────────────── */
779
780 /* Fields Fossil emits with no type, or type="input" (forum title, ticket
781 e-mail), which the input[type=text] rule above does not match */
782 input:not([type]), input[type=input] {
783 background: var(--input-bg); border: 1px solid var(--border); border-radius: 4px;
784 color: var(--text); font-family: var(--font); font-size: 1em; padding: 0.35em 0.6em;
785 }
786 input[type=file]::file-selector-button {
787 background: var(--surface2); border: 1px solid var(--border); border-radius: 4px;
788 color: var(--text); font-family: var(--font); font-size: 0.95em; padding: 0.35em 0.8em;
789 margin-right: 0.6em; cursor: pointer;
790 }
791 input[type=file]::file-selector-button:hover { background: var(--btn-hover); border-color: var(--muted); }
792
793 /* Forum subjects may shrink below a long word on narrow screens. */
794 @media screen and (max-width: 600px) {
795 body.forum td.subject { overflow-wrap: anywhere; }
796 }
797
798 /* Long hashes in titles and headings wrap instead of widening the page */
799 .title, span.page-title, .content h1, .content h2, .content h3 { overflow-wrap: anywhere; }
800 .title { min-width: 0; }
801 .content :not(pre) > code { overflow-wrap: break-word; }
802 .markdown p, .markdown li { overflow-wrap: break-word; }
803
804 /* Rendered markdown looks the same wherever it appears (the wiki editor's
805 preview nests it deeper than the page does) */
806 .markdown pre {
807 background-color: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px;
808 }
809 .markdown p > code, .markdown li > code, .markdown td > code {
810 background-color: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px;
811 }
812
813 /* Chat: a bubble holding an attachment stays inside its column */
814 body.chat .message-widget-content { box-sizing: border-box; max-width: 100%; }
815 body.chat .chat-message-popup > .toolbar { align-items: stretch; }
816 body.chat .chat-message-popup > .toolbar > a { display: inline-flex; align-items: center; }
817
818 /* Activity-report charts: a11y.js gives them a viewBox so they can shrink */
819 .content svg.fit { max-width: 100%; height: auto; }
820
821 /* Contrast: links on Fossil's colored rows, closed tickets in the timeline,
822 the fourth capability marker */
823 body.report table.report tr[style*="background-color"] a,
824 table.timelineTable td[style*="background"] a { color: var(--link-on-tint) !important; }
825 td.tktTlClosed { color: var(--muted); }
826 span.ueditInheritNobody { color: var(--green) !important; }
827
828 /* Ticket view: a label alone in its row ("Description:") sits at the left,
829 like "User Comments:" below it */
830 td.tktDspLabel:only-child { text-align: left; }
831
832 /* Bare <table border="1"> (user categories, unversioned files) */
833 .content table[border="1"] { border-collapse: collapse; border-color: var(--border); }
834 .content table[border="1"] > * > tr > td, .content table[border="1"] > * > tr > th { border: 1px solid var(--border); padding: 4px 8px; }
835
836 /* Lists Fossil marks list-style:none keep no bullets */
837 .content ul[style*="list-style"] > li { list-style-type: inherit; }
838
839 /* Main menu: the full bar on every screen. The menu button stays pinned at
840 the left while the entries scroll sideways beneath it, and a fade at the
841 right edge shows there is more. (Fossil would hide entries marked
842 desktoponly / wideonly on small screens; the display set on ".mainmenu a"
843 above keeps them, on purpose.) */
844 #hbbtn {
845 position: sticky; left: 0; z-index: 2;
846 background: var(--surface) linear-gradient(var(--band-top), var(--surface));
847 }
848 .mainmenu::after {
849 content: ""; flex: 0 0 28px; position: sticky; right: 0; pointer-events: none;
850 background: var(--surface) linear-gradient(var(--band-top), var(--surface));
851 -webkit-mask-image: linear-gradient(to right, transparent, #000 85%); mask-image: linear-gradient(to right, transparent, #000 85%);
852 }
853
854 /* Phone menu sheet: top-level entries are destinations, so they read as
855 links in 44px rows */
856 @media screen and (max-width: 600px), (pointer: coarse) {
857 ul#sitemap { padding: 0.5rem 1rem 1.5rem; }
858 ul#sitemap > li { margin: 0; border-bottom: 1px solid var(--rule); }
859 ul#sitemap > li > a {
860 display: flex; align-items: center; min-height: 44px; box-sizing: border-box;
861 font-size: 1em; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text);
862 }
863 ul#sitemap ul { margin: 0 0 0.4rem; }
864 ul#sitemap ul li a { box-sizing: border-box; min-height: 44px; padding-left: 1rem; color: var(--link); }
865
866 /* Touch targets */
867 .submenu a, .submenu label, .sectionmenu a { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }
868 input[type=text], input[type=password], input[type=email], input[type=search], input[type=number],
869 input:not([type]), input[type=input], select, input[type=submit], input[type=button], button {
870 min-height: 44px; box-sizing: border-box;
871 }
872 input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
873 }
874
875 @media screen and (max-width: 600px) {
876 /* A long unbroken word in a timeline row (a mirrored e-mail address as the
877 login, a path in the comment) wraps instead of widening the page */
878 table.timelineTable td.timelineModernCell, table.timelineTable td.timelineDetailCell,
879 .timelineModernComment, .timelineModernDetail,
880 .content table.timelineTable td.timelineModernCell * { overflow-wrap: anywhere; }
881
882 /* Forms and their fields never exceed the screen */
883 .content form { max-width: 100%; }
884 .content textarea, .content input:not([type=checkbox]):not([type=radio]), .content select { max-width: 100%; box-sizing: border-box; }
885 body.forum .content form { display: block; }
886
887 /* Markdown tables scroll inside themselves, like sortable tables */
888 .content table.md-table, .markdown table { display: block; max-width: 100%; overflow-x: auto; }
889
890 /* Ticket reports: one line per row inside the scrolling table */
891 .content table.report td { white-space: nowrap; }
892 .content table.report td:last-child { white-space: normal; min-width: 12em; max-width: 18em; }
893
894 /* Tickets: Fossil's label | value tables become label above value */
895 body.tkt .content form > table, body.tkt .content > table[cellpadding],
896 body.tkt .content form > table > tbody, body.tkt .content > table[cellpadding] > tbody,
897 body.tkt .content form > table > tbody > tr, body.tkt .content > table[cellpadding] > tbody > tr { display: block; }
898 body.tkt .content form > table > tbody > tr > td, body.tkt .content > table[cellpadding] > tbody > tr > td {
899 display: block; width: auto; text-align: left; padding: 2px 0;
900 }
901 body.tkt .content > table[cellpadding] > tbody > tr > td.tktDspLabel { padding: 12px 0 3px; font-size: 0.9em; color: var(--muted); }
902 body.tkt .content > table[cellpadding] > tbody > tr > td.tktDspValue { padding: 6px 10px; border-radius: 4px; min-height: 1.4em; overflow-wrap: anywhere; }
903 body.tkt .content form > table > tbody > tr > td:nth-child(3) { color: var(--muted); font-size: 0.9em; }
904 body.tkt .content form > table > tbody > tr > td[align=right] { padding-top: 12px; color: var(--muted); }
905
906 /* File ages: age and file on one line, the check-in below */
907 body.fileage .content table:not(.timelineTable), body.fileage .content table:not(.timelineTable) > * { display: block; }
908 body.fileage .content table:not(.timelineTable) tr { display: grid; grid-template-columns: 6.5em 1fr; border-bottom: 1px solid var(--rule); }
909 body.fileage .content table:not(.timelineTable) td { border: 0; overflow-wrap: anywhere; }
910 body.fileage .content table:not(.timelineTable) td:nth-child(3), body.fileage .content table:not(.timelineTable) th:nth-child(3) {
911 grid-column: 1 / -1; max-width: none; padding-top: 0; color: var(--muted); font-size: 0.9em;
912 }
913
914 /* Admin forms: tables that hold fields stack their cells */
915 body.setup .content table:not(.sortable):not([border]):has(input, textarea, select),
916 body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody,
917 body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody > tr,
918 body.setup .content table:not(.sortable):not([border]):has(input, textarea, select) > tbody > tr > td {
919 display: block; width: auto; max-width: 100%; text-align: left;
920 }
921 body.setup .content textarea { width: 100%; }
922 body.setup .content label { white-space: normal; }
923
924 /* Other wide admin tables scroll inside themselves; long option lists wrap */
925 .content table#capabilitySummary, .cpage-rcvfromlist .content > table { display: block; max-width: 100%; overflow-x: auto; }
926 .content tt, .cpage-secaudit0 .content li { overflow-wrap: anywhere; }
927
928 /* Forum replies: 10px a level instead of Fossil's 4ex, so deep threads keep
929 their shape and their width. Every level up to ten stays distinct. */
930 div.forumTime[style*="margin-left:"] { margin-left: 100px !important; }
931 div.forumTime[style*="left:4ex"] { margin-left: 10px !important; }
932 div.forumTime[style*="left:8ex"] { margin-left: 20px !important; }
933 div.forumTime[style*="left:12ex"] { margin-left: 30px !important; }
934 div.forumTime[style*="left:16ex"] { margin-left: 40px !important; }
935 div.forumTime[style*="left:20ex"] { margin-left: 50px !important; }
936 div.forumTime[style*="left:24ex"] { margin-left: 60px !important; }
937 div.forumTime[style*="left:28ex"] { margin-left: 70px !important; }
938 div.forumTime[style*="left:32ex"] { margin-left: 80px !important; }
939 div.forumTime[style*="left:36ex"] { margin-left: 90px !important; }
940 div.forumTime[style*="left:40ex"] { margin-left: 100px !important; }
941 }
942
943 /* Windows between phone and desktop width (a half-screen browser, a tablet):
944 the page never scrolls sideways there either. The same measures as on
945 phones, without the phone-only layout changes. */
946 @media screen and (min-width: 601px) and (max-width: 1100px) {
947 table.label-value td { white-space: normal !important; overflow-wrap: anywhere; }
948 table.label-value td .nobr, table.label-value td .nobr *,
949 td.tktDspValue .nobr, td.tktDspValue .nobr * { white-space: normal !important; word-break: break-all; }
950 .content table.sortable, .content table.report, .content table.userTable, .content table.md-table, .markdown table,
951 .content table#capabilitySummary, .cpage-rcvfromlist .content > table {
952 display: block; max-width: 100%; overflow-x: auto;
953 }
954 .content form { max-width: 100%; }
955 .content textarea, .content input:not([type=checkbox]):not([type=radio]), .content select { max-width: 100%; box-sizing: border-box; }
956 body.forum .content form { display: block; }
957 .content tt, .cpage-secaudit0 .content li { overflow-wrap: anywhere; }
958 /* Ticket forms: label above field, as on phones */
959 body.tkt .content form > table, body.tkt .content form > table > tbody,
960 body.tkt .content form > table > tbody > tr { display: block; }
961 body.tkt .content form > table > tbody > tr > td { display: block; width: auto; text-align: left; padding: 2px 0; }
962 body.tkt .content form > table > tbody > tr > td:nth-child(3) { color: var(--muted); font-size: 0.9em; }
963 body.tkt .content form > table > tbody > tr > td[align=right] { padding-top: 12px; color: var(--muted); }
964 }
965
966 /* A long unbroken word in any timeline entry (a wiki page named after a
967 full hash, a path, an e-mail address as login) wraps at every width */
968 .content table.timelineTable td[class$="Cell"], .content table.timelineTable td[class$="Cell"] *,
969 .content table.timelineTable span[class*="Comment"], .content table.timelineTable span[class*="Comment"] *,
970 .content table.timelineTable span[class*="Detail"], .content table.timelineTable span[class*="Detail"] * { overflow-wrap: anywhere; }
971
972 /* Login page on phones: fields stack under their labels, and the anonymous
973 login's ASCII-art captcha scrolls inside its own box */
974 @media screen and (max-width: 600px) {
975 table.login_out, table.login_out > tbody, table.login_out > tbody > tr,
976 table.login_out > tbody > tr > td { display: block; width: auto; text-align: left; }
977 table.login_out input[type=text], table.login_out input[type=password] { width: 100%; box-sizing: border-box; }
978 .content table.captcha, .content div.captcha { display: block; max-width: 100%; overflow-x: auto; }
979 }
980
981 /* Long branch names and "merged into" notes wrap instead of widening the page */
982 body.branch .brlist > table td:first-child, body.branch .brlist > table td:last-child {
983 white-space: normal; overflow-wrap: anywhere;
984 }
985 /* Submenu drop-downs never grow wider than the screen */
986 span.submenuctrl { max-width: 100%; min-width: 0; }
987 .submenu select, .sectionmenu select { max-width: 100%; min-width: 0; }
988 /* Long file names, search snippets, login notes and help options wrap */
989 ul.browser a, .content .snippet, body.rpage-search .content li,
990 body.login .content p, dl.helpOptions dt, dl.helpOptions dd { overflow-wrap: anywhere; }
991 /* Fossil sizes the file browser's columns from the longest name and keeps
992 names on one line. On phones use one column and let a long name wrap. */
993 @media screen and (max-width: 600px) {
994 .content div.columns { columns: auto 1 !important; }
995 .content ul.browser { white-space: normal; }
996 }
997
998 /* A message's header line (sender, number, time) may wrap. Fossil keeps it
999 on one line, so a long login made the message list scroll sideways. */
1000 body.chat div.message-widget .message-widget-tab { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
--- a/skins/refined-light/details.txt
+++ b/skins/refined-light/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+t1
3
+timeline-color-graph-lines: 1
--- a/skins/refined-light/details.txt
+++ b/skins/refined-light/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/refined-light/details.txt
+++ b/skins/refined-light/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 t1
3 timeline-color-graph-lines: 1
--- a/skins/refined-light/footer.txt
+++ b/skins/refined-light/footer.txt
@@ -0,0 +1,7 @@
1
+<footer>
2
+ <span class="footer-project">$<project_name></span>
3
+ <span class="footer-meta">
4
+ fossil $release_version &middot;
5
+ <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s
6
+ </span>
7
+</footer>
--- a/skins/refined-light/footer.txt
+++ b/skins/refined-light/footer.txt
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
--- a/skins/refined-light/footer.txt
+++ b/skins/refined-light/footer.txt
@@ -0,0 +1,7 @@
1 <footer>
2 <span class="footer-project">$<project_name></span>
3 <span class="footer-meta">
4 fossil $release_version &middot;
5 <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s
6 </span>
7 </footer>
--- a/skins/refined-light/header.txt
+++ b/skins/refined-light/header.txt
@@ -0,0 +1,44 @@
1
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
2
+<script defer src="$home/script.js"></script>
3
+<a class="skip-nav" href="#main-content">Skip to content</a>
4
+<header>
5
+ <div class="title">
6
+ <a href="$home/home" class="project-name">$<project_name></a>
7
+ <span class="page-title">$<title></span>
8
+ </div>
9
+ <div class="status">
10
+ <th1>
11
+ if {[info exists login]} {
12
+ html "<a href='$home/login'>$login</a>\n"
13
+ } else {
14
+ html "<a href='$home/login'>Login</a>\n"
15
+ }
16
+ </th1>
17
+ </div>
18
+</header>
19
+<nav class="mainmenu" aria-label="Main menu">
20
+ <th1>
21
+ html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map' aria-expanded='false' aria-controls='hbdrop'>&#9776;</a>"
22
+ builtin_request_js hbmenu.js
23
+ foreach {name url expr class} $mainmenu {
24
+ if {![capexpr $expr]} continue
25
+ if {[string match /* $url]} {
26
+ if {[string match $url\[/?#\]* /$current_page/]} {
27
+ set class "active $class"
28
+ }
29
+ set url $home$url
30
+ }
31
+ html "<a href='$url' class='$class'>$name</a>\n"
32
+ }
33
+ </th1>
34
+</nav>
35
+<nav id="hbdrop" class='hbdrop' aria-label="Site map" data-anim-ms="0"></nav>
36
+<div id="main-content" tabindex="-1" style="height:0;overflow:hidden;position:absolute"></div>
37
+<th1>
38
+ if {[string compare $title index]==0 || [string compare $title Home]==0} {
39
+ html "<h1 class='page-title home-title'>[htmlize $title]</h1>\n"
40
+ } else {
41
+ html "<h1 class='page-title'>[htmlize $title]</h1>\n"
42
+ }
43
+</th1>
44
+
--- a/skins/refined-light/header.txt
+++ b/skins/refined-light/header.txt
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/refined-light/header.txt
+++ b/skins/refined-light/header.txt
@@ -0,0 +1,44 @@
1 <meta name="viewport" content="width=device-width, initial-scale=1.0">
2 <script defer src="$home/script.js"></script>
3 <a class="skip-nav" href="#main-content">Skip to content</a>
4 <header>
5 <div class="title">
6 <a href="$home/home" class="project-name">$<project_name></a>
7 <span class="page-title">$<title></span>
8 </div>
9 <div class="status">
10 <th1>
11 if {[info exists login]} {
12 html "<a href='$home/login'>$login</a>\n"
13 } else {
14 html "<a href='$home/login'>Login</a>\n"
15 }
16 </th1>
17 </div>
18 </header>
19 <nav class="mainmenu" aria-label="Main menu">
20 <th1>
21 html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map' aria-expanded='false' aria-controls='hbdrop'>&#9776;</a>"
22 builtin_request_js hbmenu.js
23 foreach {name url expr class} $mainmenu {
24 if {![capexpr $expr]} continue
25 if {[string match /* $url]} {
26 if {[string match $url\[/?#\]* /$current_page/]} {
27 set class "active $class"
28 }
29 set url $home$url
30 }
31 html "<a href='$url' class='$class'>$name</a>\n"
32 }
33 </th1>
34 </nav>
35 <nav id="hbdrop" class='hbdrop' aria-label="Site map" data-anim-ms="0"></nav>
36 <div id="main-content" tabindex="-1" style="height:0;overflow:hidden;position:absolute"></div>
37 <th1>
38 if {[string compare $title index]==0 || [string compare $title Home]==0} {
39 html "<h1 class='page-title home-title'>[htmlize $title]</h1>\n"
40 } else {
41 html "<h1 class='page-title'>[htmlize $title]</h1>\n"
42 }
43 </th1>
44
--- a/skins/refined-light/js.txt
+++ b/skins/refined-light/js.txt
@@ -0,0 +1,338 @@
1
+document.addEventListener('DOMContentLoaded', function () {
2
+(function () {
3
+ 'use strict';
4
+
5
+ /* ─────────────────────────────────────────────────────────────────────
6
+ 1. isDark patch
7
+ Fossil's C code hard-codes isDark:false for all custom skins,
8
+ ignoring the skin-detail config key. Patch it here after Fossil's
9
+ inline scripts have already run (guaranteed by defer).
10
+ ───────────────────────────────────────────────────────────────────── */
11
+ function patchIsDark() {
12
+ /* Only for the dark variant: the light build of this skin embeds the
13
+ same script, and its stylesheet declares color-scheme: light. */
14
+ if (getComputedStyle(document.documentElement).colorScheme.indexOf('dark') < 0) return;
15
+ if (window.fossil && window.fossil.config && window.fossil.config.skin) {
16
+ window.fossil.config.skin.isDark = true;
17
+ }
18
+ document.body.classList.add('fossil-dark-style');
19
+ }
20
+
21
+ /* ─────────────────────────────────────────────────────────────────────
22
+ 2. Main landmark
23
+ div.content is Fossil's primary content wrapper but has no landmark
24
+ role. Adding role="main" lets screen reader users jump to content.
25
+ ───────────────────────────────────────────────────────────────────── */
26
+ function addMainLandmark() {
27
+ var content = document.querySelector('div.content');
28
+ if (content && !content.getAttribute('role')) {
29
+ content.setAttribute('role', 'main');
30
+ }
31
+ }
32
+
33
+ /* ─────────────────────────────────────────────────────────────────────
34
+ 3. Hamburger menu — the worst accessibility failure in the skin
35
+ ----------------------------------------------------------------
36
+ What Fossil gives us:
37
+ <a id="hbbtn" href="/repo/sitemap" aria-label="Site Map">☰</a>
38
+ <nav id="hbdrop" class="hbdrop" title="sitemap"></nav>
39
+
40
+ Problems:
41
+ - No aria-expanded: screen readers can't tell if the menu is open
42
+ - No aria-controls: no programmatic link between button and panel
43
+ - hbdrop has no role or accessible name beyond an unhelpful title
44
+ - When the menu opens, focus stays on hbbtn — user cannot reach
45
+ the menu links by keyboard without realising the menu opened
46
+ - Escape key does not close the menu
47
+ - hbmenu.js controls visibility via style.display; we use
48
+ MutationObserver to stay in sync rather than patching the JS
49
+
50
+ Fixes applied:
51
+ - aria-expanded / aria-controls on hbbtn
52
+ - role="navigation" + aria-label on hbdrop
53
+ - MutationObserver: sync aria-expanded on every show/hide
54
+ - On open: move focus to the first link in the dropdown
55
+ - On Escape inside dropdown: close panel, return focus to hbbtn
56
+ ───────────────────────────────────────────────────────────────────── */
57
+ function fixHamburgerMenu() {
58
+ var btn = document.getElementById('hbbtn');
59
+ var drop = document.getElementById('hbdrop');
60
+ if (!btn || !drop) return;
61
+
62
+ var nav = btn.closest('nav.mainmenu') || btn.parentNode;
63
+ if (!nav) return;
64
+
65
+ /* Position the dropdown using position:fixed so it overlays content
66
+ regardless of DOM structure. We set --nav-bottom as a CSS variable
67
+ so the dropdown's top edge tracks the nav bar's bottom edge. */
68
+ function setNavBottom() {
69
+ var bottom = Math.max(0, nav.getBoundingClientRect().bottom);
70
+ document.documentElement.style.setProperty('--nav-bottom', bottom + 'px');
71
+ }
72
+ setNavBottom();
73
+ window.addEventListener('resize', setNavBottom);
74
+ /* Measure again on every open (capture: before hbmenu.js shows the
75
+ panel), so the menu opens under the nav bar wherever the page is. */
76
+ btn.addEventListener('click', setNavBottom, true);
77
+ /* Open by touch or mouse vs keyboard: only the keyboard gets focus moved */
78
+ var openedByPointer = false;
79
+ btn.addEventListener('pointerdown', function () { openedByPointer = true; });
80
+ btn.addEventListener('keydown', function () { openedByPointer = false; });
81
+
82
+ /* Static button semantics (JS will keep aria-expanded in sync) */
83
+ btn.setAttribute('aria-expanded', 'false');
84
+ btn.setAttribute('aria-controls', 'hbdrop');
85
+
86
+ /* Panel semantics */
87
+ drop.setAttribute('role', 'navigation');
88
+ drop.setAttribute('aria-label', 'Site map');
89
+
90
+ /* Sync aria-expanded whenever hbmenu.js toggles panel visibility.
91
+ hbmenu.js uses style.display to show/hide — observe that attribute. */
92
+ var menuObserver = new MutationObserver(function () {
93
+ var open = getComputedStyle(drop).display !== 'none';
94
+ btn.setAttribute('aria-expanded', open ? 'true' : 'false');
95
+
96
+ /* Move focus into the panel when it opens so keyboard users
97
+ can immediately navigate the links without guessing. */
98
+ if (open) {
99
+ /* The nav bar may now be stuck to the top (see the skin CSS) */
100
+ requestAnimationFrame(setNavBottom);
101
+ if (!openedByPointer) {
102
+ var firstLink = drop.querySelector('a');
103
+ if (firstLink) firstLink.focus({ preventScroll: true });
104
+ }
105
+ }
106
+ });
107
+ menuObserver.observe(drop, { attributes: true, attributeFilter: ['style'] });
108
+
109
+ /* Escape inside the dropdown: close the panel and return focus.
110
+ We set display directly — this also triggers the MutationObserver
111
+ which will update aria-expanded to 'false'. */
112
+ drop.addEventListener('keydown', function (e) {
113
+ if (e.key === 'Escape' || e.keyCode === 27) {
114
+ drop.style.display = 'none';
115
+ btn.focus();
116
+ }
117
+ });
118
+ }
119
+
120
+ /* ─────────────────────────────────────────────────────────────────────
121
+ 4. Timeline table
122
+ ----------------------------------------------------------------
123
+ Structure Fossil generates:
124
+
125
+ <table class="timelineTable">
126
+ <tr class="timelineDateRow">
127
+ <td><div class="timelineDate">2026-03-14</div></td>
128
+ <td></td> <- empty filler for graph column
129
+ <td></td> <- empty filler for comment column
130
+ </tr>
131
+ <tr>
132
+ <td class="timelineTime">20:16</td>
133
+ <td class="timelineGraph">
134
+ <div class="tl-nodemark"></div> <- JS draws SVG here later
135
+ </td>
136
+ <td class="timelineModernCell" id="mc1">
137
+ <span class="timelineModernComment">commit message</span>
138
+ <span class="timelineModernDetail">...</span>
139
+ </td>
140
+ </tr>
141
+ </table>
142
+
143
+ Fixes applied:
144
+ - aria-label="Commit timeline" on each .timelineTable
145
+ - aria-hidden="true" on all td.timelineGraph cells
146
+ - aria-hidden="true" on filler cells in timelineDateRow rows
147
+ - aria-label="Time: HH:MM" on timelineTime cells
148
+
149
+ Run at defer-time AND on window.load because Fossil's timeline JS
150
+ inserts SVG canvas elements into the graph cells on window.load.
151
+ ───────────────────────────────────────────────────────────────────── */
152
+ function fixTimeline() {
153
+ /* Label each timeline table */
154
+ document.querySelectorAll('table.timelineTable').forEach(function (tbl) {
155
+ if (!tbl.getAttribute('aria-label') && !tbl.querySelector('caption')) {
156
+ tbl.setAttribute('aria-label', 'Commit timeline');
157
+ }
158
+ });
159
+
160
+ /* Hide the graph column — purely visual SVG/canvas drawn by Fossil JS */
161
+ document.querySelectorAll('td.timelineGraph').forEach(function (td) {
162
+ td.setAttribute('aria-hidden', 'true');
163
+ });
164
+
165
+ /* Hide filler cells in date-separator rows */
166
+ document.querySelectorAll('tr.timelineDateRow').forEach(function (tr) {
167
+ tr.querySelectorAll('td + td').forEach(function (td) {
168
+ td.setAttribute('aria-hidden', 'true');
169
+ });
170
+ });
171
+
172
+ /* Give bare time cells a descriptive label.
173
+ Strip stray </a> text artefact Fossil emits in anonymous mode. */
174
+ document.querySelectorAll('td.timelineTime').forEach(function (td) {
175
+ var text = td.textContent.trim();
176
+ if (text && !td.getAttribute('aria-label')) {
177
+ td.setAttribute('aria-label', 'Time: ' + text);
178
+ }
179
+ });
180
+ }
181
+
182
+ /* ─────────────────────────────────────────────────────────────────────
183
+ 5. Sortable table headers — add scope="col"
184
+ Fossil generates <th> elements in branch, tag, file, and ticket
185
+ tables but never includes scope. Screen readers cannot correctly
186
+ associate header text with the cells in each column.
187
+ ───────────────────────────────────────────────────────────────────── */
188
+ function fixTableHeaders() {
189
+ var selector = [
190
+ 'table.sortable th',
191
+ 'table.filelistTable th',
192
+ 'table.branchlistTable th',
193
+ 'table.taglistTable th',
194
+ 'table.userlistTable th',
195
+ 'table.report th',
196
+ ].join(', ');
197
+ document.querySelectorAll(selector).forEach(function (th) {
198
+ if (!th.getAttribute('scope')) {
199
+ th.setAttribute('scope', 'col');
200
+ }
201
+ });
202
+ }
203
+
204
+ /* ─────────────────────────────────────────────────────────────────────
205
+ 6. Submenu select labels
206
+ Fossil renders <select> controls in the page submenu with no
207
+ associated <label>. We add aria-label from the preceding sibling
208
+ label text, falling back to a class-name lookup table.
209
+ ───────────────────────────────────────────────────────────────────── */
210
+ var SELECT_LABELS = {
211
+ 'smc-ss': 'View style',
212
+ 'smc-ci': 'Check-in',
213
+ 'smc-v': 'Version',
214
+ 'smc-r': 'Repository',
215
+ 'smc-b': 'Branch',
216
+ 'smc-t': 'Tag',
217
+ 'smc-u': 'User',
218
+ };
219
+
220
+ /* Charts Fossil draws as <svg width= height=> with no viewBox cannot be
221
+ scaled by CSS. Give them one; the skin's "svg.fit" rule does the rest. */
222
+ function fitCharts() {
223
+ document.querySelectorAll('.content svg[width][height]:not([viewBox])').forEach(function (s) {
224
+ var w = parseFloat(s.getAttribute('width')), h = parseFloat(s.getAttribute('height'));
225
+ if (!(w > 0 && h > 0)) return;
226
+ s.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
227
+ s.classList.add('fit');
228
+ });
229
+ }
230
+
231
+ /* Sortable column headers respond to clicks only. Put them in the tab
232
+ order and let Enter or Space do what a click does. */
233
+ function fixSortableHeaders() {
234
+ document.querySelectorAll('table.sortable th').forEach(function (th) {
235
+ if (th.hasAttribute('tabindex')) return;
236
+ th.setAttribute('tabindex', '0');
237
+ th.addEventListener('keydown', function (e) {
238
+ if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); th.click(); }
239
+ });
240
+ });
241
+ }
242
+
243
+ /* The menu bar scrolls sideways on narrow screens. Bring the current
244
+ page's entry into view, without moving the page itself. */
245
+ function showActiveMenuItem() {
246
+ var nav = document.querySelector('nav.mainmenu');
247
+ var a = nav && nav.querySelector('a.active');
248
+ var hb = document.getElementById('hbbtn');
249
+ if (!a || a === hb || nav.scrollWidth <= nav.clientWidth) return;
250
+ var left = a.offsetLeft - nav.offsetLeft, pinned = hb ? hb.offsetWidth : 0;
251
+ if (left - pinned < nav.scrollLeft || left + a.offsetWidth > nav.scrollLeft + nav.clientWidth - 28) {
252
+ nav.scrollLeft = Math.max(0, left - pinned - 12);
253
+ }
254
+ }
255
+
256
+ function fixSubmenuSelects() {
257
+ document.querySelectorAll('div.submenu select, div.sectionmenu select').forEach(function (sel) {
258
+ if (sel.getAttribute('aria-label') || sel.getAttribute('aria-labelledby')) return;
259
+
260
+ /* Walk backwards through siblings to find a .label text node */
261
+ var prev = sel.previousElementSibling;
262
+ while (prev) {
263
+ if (prev.classList.contains('label') && prev.textContent.trim()) {
264
+ sel.setAttribute('aria-label', prev.textContent.trim());
265
+ return;
266
+ }
267
+ prev = prev.previousElementSibling;
268
+ }
269
+
270
+ /* Class-name lookup */
271
+ var classes = Array.from(sel.classList);
272
+ for (var i = 0; i < classes.length; i++) {
273
+ if (SELECT_LABELS[classes[i]]) {
274
+ sel.setAttribute('aria-label', SELECT_LABELS[classes[i]]);
275
+ return;
276
+ }
277
+ }
278
+
279
+ sel.setAttribute('aria-label', 'Filter');
280
+ });
281
+ }
282
+
283
+ /* ─────────────────────────────────────────────────────────────────────
284
+ 7. Day of week on each timeline date
285
+ Fossil's date rows carry only the date ("2026-11-11"). This puts the
286
+ full weekday on a small line above it. The weekday comes from Ben
287
+ Joffe's branchless method (benjoffe.com/fast-day-of-week), as zit
288
+ uses it: one multiply and two shifts, exact for every 32-bit day
289
+ number. It is read from the date Fossil prints, so it always matches
290
+ that date whether the timeline shows UTC or local time. The skin CSS
291
+ reserves the line before this runs, so setting the name moves nothing.
292
+ ───────────────────────────────────────────────────────────────────── */
293
+ var WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
294
+ function weekdayOf(dayNumber) { /* days since 1970-01-01 -> 0 = Sunday */
295
+ return ((Math.imul(dayNumber, 613566756) + 0x95000000 +
296
+ (dayNumber >> 1) + (dayNumber >> 4)) >>> 0) >>> 29;
297
+ }
298
+ function addWeekdays() {
299
+ var rows = document.querySelectorAll('div.timelineDate');
300
+ for (var i = 0; i < rows.length; i++) {
301
+ if (rows[i].hasAttribute('data-dow')) continue;
302
+ var m = /^(\d{4})-(\d\d)-(\d\d)$/.exec(rows[i].textContent.trim());
303
+ if (!m) continue;
304
+ /* The skin CSS shows this in a line it reserves above the date */
305
+ rows[i].setAttribute('data-dow', WEEKDAYS[weekdayOf(Date.UTC(+m[1], m[2] - 1, +m[3]) / 864e5)]);
306
+ }
307
+ }
308
+
309
+ /* ─────────────────────────────────────────────────────────────────────
310
+ Execute all fixes
311
+ The script is deferred so the DOM is fully parsed when this runs.
312
+ Fossil's inline config scripts have already executed, so
313
+ window.fossil exists and we can patch isDark immediately.
314
+ ───────────────────────────────────────────────────────────────────── */
315
+ patchIsDark();
316
+ addMainLandmark();
317
+ fixHamburgerMenu();
318
+ fixTimeline();
319
+ fixTableHeaders();
320
+ fixSubmenuSelects();
321
+ fitCharts();
322
+ showActiveMenuItem();
323
+ fixSortableHeaders();
324
+ addWeekdays();
325
+
326
+ /* Re-run after window.load: Fossil's timeline renderer inserts
327
+ .tl-canvas SVG elements into td.timelineGraph on load, and
328
+ Fossil's own load handlers may reset isDark. */
329
+ window.addEventListener('load', function () {
330
+ patchIsDark();
331
+ fixTimeline();
332
+ fixTableHeaders();
333
+ fixSubmenuSelects();
334
+ });
335
+
336
+}());
337
+
338
+});
--- a/skins/refined-light/js.txt
+++ b/skins/refined-light/js.txt
@@ -0,0 +1,338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/refined-light/js.txt
+++ b/skins/refined-light/js.txt
@@ -0,0 +1,338 @@
1 document.addEventListener('DOMContentLoaded', function () {
2 (function () {
3 'use strict';
4
5 /* ─────────────────────────────────────────────────────────────────────
6 1. isDark patch
7 Fossil's C code hard-codes isDark:false for all custom skins,
8 ignoring the skin-detail config key. Patch it here after Fossil's
9 inline scripts have already run (guaranteed by defer).
10 ───────────────────────────────────────────────────────────────────── */
11 function patchIsDark() {
12 /* Only for the dark variant: the light build of this skin embeds the
13 same script, and its stylesheet declares color-scheme: light. */
14 if (getComputedStyle(document.documentElement).colorScheme.indexOf('dark') < 0) return;
15 if (window.fossil && window.fossil.config && window.fossil.config.skin) {
16 window.fossil.config.skin.isDark = true;
17 }
18 document.body.classList.add('fossil-dark-style');
19 }
20
21 /* ─────────────────────────────────────────────────────────────────────
22 2. Main landmark
23 div.content is Fossil's primary content wrapper but has no landmark
24 role. Adding role="main" lets screen reader users jump to content.
25 ───────────────────────────────────────────────────────────────────── */
26 function addMainLandmark() {
27 var content = document.querySelector('div.content');
28 if (content && !content.getAttribute('role')) {
29 content.setAttribute('role', 'main');
30 }
31 }
32
33 /* ─────────────────────────────────────────────────────────────────────
34 3. Hamburger menu — the worst accessibility failure in the skin
35 ----------------------------------------------------------------
36 What Fossil gives us:
37 <a id="hbbtn" href="/repo/sitemap" aria-label="Site Map">☰</a>
38 <nav id="hbdrop" class="hbdrop" title="sitemap"></nav>
39
40 Problems:
41 - No aria-expanded: screen readers can't tell if the menu is open
42 - No aria-controls: no programmatic link between button and panel
43 - hbdrop has no role or accessible name beyond an unhelpful title
44 - When the menu opens, focus stays on hbbtn — user cannot reach
45 the menu links by keyboard without realising the menu opened
46 - Escape key does not close the menu
47 - hbmenu.js controls visibility via style.display; we use
48 MutationObserver to stay in sync rather than patching the JS
49
50 Fixes applied:
51 - aria-expanded / aria-controls on hbbtn
52 - role="navigation" + aria-label on hbdrop
53 - MutationObserver: sync aria-expanded on every show/hide
54 - On open: move focus to the first link in the dropdown
55 - On Escape inside dropdown: close panel, return focus to hbbtn
56 ───────────────────────────────────────────────────────────────────── */
57 function fixHamburgerMenu() {
58 var btn = document.getElementById('hbbtn');
59 var drop = document.getElementById('hbdrop');
60 if (!btn || !drop) return;
61
62 var nav = btn.closest('nav.mainmenu') || btn.parentNode;
63 if (!nav) return;
64
65 /* Position the dropdown using position:fixed so it overlays content
66 regardless of DOM structure. We set --nav-bottom as a CSS variable
67 so the dropdown's top edge tracks the nav bar's bottom edge. */
68 function setNavBottom() {
69 var bottom = Math.max(0, nav.getBoundingClientRect().bottom);
70 document.documentElement.style.setProperty('--nav-bottom', bottom + 'px');
71 }
72 setNavBottom();
73 window.addEventListener('resize', setNavBottom);
74 /* Measure again on every open (capture: before hbmenu.js shows the
75 panel), so the menu opens under the nav bar wherever the page is. */
76 btn.addEventListener('click', setNavBottom, true);
77 /* Open by touch or mouse vs keyboard: only the keyboard gets focus moved */
78 var openedByPointer = false;
79 btn.addEventListener('pointerdown', function () { openedByPointer = true; });
80 btn.addEventListener('keydown', function () { openedByPointer = false; });
81
82 /* Static button semantics (JS will keep aria-expanded in sync) */
83 btn.setAttribute('aria-expanded', 'false');
84 btn.setAttribute('aria-controls', 'hbdrop');
85
86 /* Panel semantics */
87 drop.setAttribute('role', 'navigation');
88 drop.setAttribute('aria-label', 'Site map');
89
90 /* Sync aria-expanded whenever hbmenu.js toggles panel visibility.
91 hbmenu.js uses style.display to show/hide — observe that attribute. */
92 var menuObserver = new MutationObserver(function () {
93 var open = getComputedStyle(drop).display !== 'none';
94 btn.setAttribute('aria-expanded', open ? 'true' : 'false');
95
96 /* Move focus into the panel when it opens so keyboard users
97 can immediately navigate the links without guessing. */
98 if (open) {
99 /* The nav bar may now be stuck to the top (see the skin CSS) */
100 requestAnimationFrame(setNavBottom);
101 if (!openedByPointer) {
102 var firstLink = drop.querySelector('a');
103 if (firstLink) firstLink.focus({ preventScroll: true });
104 }
105 }
106 });
107 menuObserver.observe(drop, { attributes: true, attributeFilter: ['style'] });
108
109 /* Escape inside the dropdown: close the panel and return focus.
110 We set display directly — this also triggers the MutationObserver
111 which will update aria-expanded to 'false'. */
112 drop.addEventListener('keydown', function (e) {
113 if (e.key === 'Escape' || e.keyCode === 27) {
114 drop.style.display = 'none';
115 btn.focus();
116 }
117 });
118 }
119
120 /* ─────────────────────────────────────────────────────────────────────
121 4. Timeline table
122 ----------------------------------------------------------------
123 Structure Fossil generates:
124
125 <table class="timelineTable">
126 <tr class="timelineDateRow">
127 <td><div class="timelineDate">2026-03-14</div></td>
128 <td></td> <- empty filler for graph column
129 <td></td> <- empty filler for comment column
130 </tr>
131 <tr>
132 <td class="timelineTime">20:16</td>
133 <td class="timelineGraph">
134 <div class="tl-nodemark"></div> <- JS draws SVG here later
135 </td>
136 <td class="timelineModernCell" id="mc1">
137 <span class="timelineModernComment">commit message</span>
138 <span class="timelineModernDetail">...</span>
139 </td>
140 </tr>
141 </table>
142
143 Fixes applied:
144 - aria-label="Commit timeline" on each .timelineTable
145 - aria-hidden="true" on all td.timelineGraph cells
146 - aria-hidden="true" on filler cells in timelineDateRow rows
147 - aria-label="Time: HH:MM" on timelineTime cells
148
149 Run at defer-time AND on window.load because Fossil's timeline JS
150 inserts SVG canvas elements into the graph cells on window.load.
151 ───────────────────────────────────────────────────────────────────── */
152 function fixTimeline() {
153 /* Label each timeline table */
154 document.querySelectorAll('table.timelineTable').forEach(function (tbl) {
155 if (!tbl.getAttribute('aria-label') && !tbl.querySelector('caption')) {
156 tbl.setAttribute('aria-label', 'Commit timeline');
157 }
158 });
159
160 /* Hide the graph column — purely visual SVG/canvas drawn by Fossil JS */
161 document.querySelectorAll('td.timelineGraph').forEach(function (td) {
162 td.setAttribute('aria-hidden', 'true');
163 });
164
165 /* Hide filler cells in date-separator rows */
166 document.querySelectorAll('tr.timelineDateRow').forEach(function (tr) {
167 tr.querySelectorAll('td + td').forEach(function (td) {
168 td.setAttribute('aria-hidden', 'true');
169 });
170 });
171
172 /* Give bare time cells a descriptive label.
173 Strip stray </a> text artefact Fossil emits in anonymous mode. */
174 document.querySelectorAll('td.timelineTime').forEach(function (td) {
175 var text = td.textContent.trim();
176 if (text && !td.getAttribute('aria-label')) {
177 td.setAttribute('aria-label', 'Time: ' + text);
178 }
179 });
180 }
181
182 /* ─────────────────────────────────────────────────────────────────────
183 5. Sortable table headers — add scope="col"
184 Fossil generates <th> elements in branch, tag, file, and ticket
185 tables but never includes scope. Screen readers cannot correctly
186 associate header text with the cells in each column.
187 ───────────────────────────────────────────────────────────────────── */
188 function fixTableHeaders() {
189 var selector = [
190 'table.sortable th',
191 'table.filelistTable th',
192 'table.branchlistTable th',
193 'table.taglistTable th',
194 'table.userlistTable th',
195 'table.report th',
196 ].join(', ');
197 document.querySelectorAll(selector).forEach(function (th) {
198 if (!th.getAttribute('scope')) {
199 th.setAttribute('scope', 'col');
200 }
201 });
202 }
203
204 /* ─────────────────────────────────────────────────────────────────────
205 6. Submenu select labels
206 Fossil renders <select> controls in the page submenu with no
207 associated <label>. We add aria-label from the preceding sibling
208 label text, falling back to a class-name lookup table.
209 ───────────────────────────────────────────────────────────────────── */
210 var SELECT_LABELS = {
211 'smc-ss': 'View style',
212 'smc-ci': 'Check-in',
213 'smc-v': 'Version',
214 'smc-r': 'Repository',
215 'smc-b': 'Branch',
216 'smc-t': 'Tag',
217 'smc-u': 'User',
218 };
219
220 /* Charts Fossil draws as <svg width= height=> with no viewBox cannot be
221 scaled by CSS. Give them one; the skin's "svg.fit" rule does the rest. */
222 function fitCharts() {
223 document.querySelectorAll('.content svg[width][height]:not([viewBox])').forEach(function (s) {
224 var w = parseFloat(s.getAttribute('width')), h = parseFloat(s.getAttribute('height'));
225 if (!(w > 0 && h > 0)) return;
226 s.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
227 s.classList.add('fit');
228 });
229 }
230
231 /* Sortable column headers respond to clicks only. Put them in the tab
232 order and let Enter or Space do what a click does. */
233 function fixSortableHeaders() {
234 document.querySelectorAll('table.sortable th').forEach(function (th) {
235 if (th.hasAttribute('tabindex')) return;
236 th.setAttribute('tabindex', '0');
237 th.addEventListener('keydown', function (e) {
238 if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); th.click(); }
239 });
240 });
241 }
242
243 /* The menu bar scrolls sideways on narrow screens. Bring the current
244 page's entry into view, without moving the page itself. */
245 function showActiveMenuItem() {
246 var nav = document.querySelector('nav.mainmenu');
247 var a = nav && nav.querySelector('a.active');
248 var hb = document.getElementById('hbbtn');
249 if (!a || a === hb || nav.scrollWidth <= nav.clientWidth) return;
250 var left = a.offsetLeft - nav.offsetLeft, pinned = hb ? hb.offsetWidth : 0;
251 if (left - pinned < nav.scrollLeft || left + a.offsetWidth > nav.scrollLeft + nav.clientWidth - 28) {
252 nav.scrollLeft = Math.max(0, left - pinned - 12);
253 }
254 }
255
256 function fixSubmenuSelects() {
257 document.querySelectorAll('div.submenu select, div.sectionmenu select').forEach(function (sel) {
258 if (sel.getAttribute('aria-label') || sel.getAttribute('aria-labelledby')) return;
259
260 /* Walk backwards through siblings to find a .label text node */
261 var prev = sel.previousElementSibling;
262 while (prev) {
263 if (prev.classList.contains('label') && prev.textContent.trim()) {
264 sel.setAttribute('aria-label', prev.textContent.trim());
265 return;
266 }
267 prev = prev.previousElementSibling;
268 }
269
270 /* Class-name lookup */
271 var classes = Array.from(sel.classList);
272 for (var i = 0; i < classes.length; i++) {
273 if (SELECT_LABELS[classes[i]]) {
274 sel.setAttribute('aria-label', SELECT_LABELS[classes[i]]);
275 return;
276 }
277 }
278
279 sel.setAttribute('aria-label', 'Filter');
280 });
281 }
282
283 /* ─────────────────────────────────────────────────────────────────────
284 7. Day of week on each timeline date
285 Fossil's date rows carry only the date ("2026-11-11"). This puts the
286 full weekday on a small line above it. The weekday comes from Ben
287 Joffe's branchless method (benjoffe.com/fast-day-of-week), as zit
288 uses it: one multiply and two shifts, exact for every 32-bit day
289 number. It is read from the date Fossil prints, so it always matches
290 that date whether the timeline shows UTC or local time. The skin CSS
291 reserves the line before this runs, so setting the name moves nothing.
292 ───────────────────────────────────────────────────────────────────── */
293 var WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
294 function weekdayOf(dayNumber) { /* days since 1970-01-01 -> 0 = Sunday */
295 return ((Math.imul(dayNumber, 613566756) + 0x95000000 +
296 (dayNumber >> 1) + (dayNumber >> 4)) >>> 0) >>> 29;
297 }
298 function addWeekdays() {
299 var rows = document.querySelectorAll('div.timelineDate');
300 for (var i = 0; i < rows.length; i++) {
301 if (rows[i].hasAttribute('data-dow')) continue;
302 var m = /^(\d{4})-(\d\d)-(\d\d)$/.exec(rows[i].textContent.trim());
303 if (!m) continue;
304 /* The skin CSS shows this in a line it reserves above the date */
305 rows[i].setAttribute('data-dow', WEEKDAYS[weekdayOf(Date.UTC(+m[1], m[2] - 1, +m[3]) / 864e5)]);
306 }
307 }
308
309 /* ─────────────────────────────────────────────────────────────────────
310 Execute all fixes
311 The script is deferred so the DOM is fully parsed when this runs.
312 Fossil's inline config scripts have already executed, so
313 window.fossil exists and we can patch isDark immediately.
314 ───────────────────────────────────────────────────────────────────── */
315 patchIsDark();
316 addMainLandmark();
317 fixHamburgerMenu();
318 fixTimeline();
319 fixTableHeaders();
320 fixSubmenuSelects();
321 fitCharts();
322 showActiveMenuItem();
323 fixSortableHeaders();
324 addWeekdays();
325
326 /* Re-run after window.load: Fossil's timeline renderer inserts
327 .tl-canvas SVG elements into td.timelineGraph on load, and
328 Fossil's own load handlers may reset isDark. */
329 window.addEventListener('load', function () {
330 patchIsDark();
331 fixTimeline();
332 fixTableHeaders();
333 fixSubmenuSelects();
334 });
335
336 }());
337
338 });
+2 -2
--- src/alerts.c
+++ src/alerts.c
@@ -1831,11 +1831,11 @@
18311831
** The subscriber is identified in several ways:
18321832
**
18331833
** * The name= query parameter contains the complete subscriberCode.
18341834
** This only happens when the user receives a verification
18351835
** email and clicks on the link in the email. When a
1836
-** compilete subscriberCode is seen on the name= query parameter,
1836
+** complete subscriberCode is seen on the name= query parameter,
18371837
** that constitutes verification of the email address.
18381838
**
18391839
** * The sid= query parameter contains an integer subscriberId.
18401840
** This only works for the administrator. It allows the
18411841
** administrator to edit any subscription.
@@ -2266,11 +2266,11 @@
22662266
**
22672267
** Non-logged-in users with no name= query parameter are invited to enter
22682268
** an email address to which will be sent the unsubscribe link that
22692269
** contains the correct subscriber code.
22702270
**
2271
-** The /unsubscribe page requires comfirmation. The /oneclickunsub
2271
+** The /unsubscribe page requires confirmation. The /oneclickunsub
22722272
** page unsubscribes immediately without any need to confirm.
22732273
*/
22742274
void unsubscribe_page(void){
22752275
const char *zName = P("name");
22762276
char *zErr = 0;
22772277
--- src/alerts.c
+++ src/alerts.c
@@ -1831,11 +1831,11 @@
1831 ** The subscriber is identified in several ways:
1832 **
1833 ** * The name= query parameter contains the complete subscriberCode.
1834 ** This only happens when the user receives a verification
1835 ** email and clicks on the link in the email. When a
1836 ** compilete subscriberCode is seen on the name= query parameter,
1837 ** that constitutes verification of the email address.
1838 **
1839 ** * The sid= query parameter contains an integer subscriberId.
1840 ** This only works for the administrator. It allows the
1841 ** administrator to edit any subscription.
@@ -2266,11 +2266,11 @@
2266 **
2267 ** Non-logged-in users with no name= query parameter are invited to enter
2268 ** an email address to which will be sent the unsubscribe link that
2269 ** contains the correct subscriber code.
2270 **
2271 ** The /unsubscribe page requires comfirmation. The /oneclickunsub
2272 ** page unsubscribes immediately without any need to confirm.
2273 */
2274 void unsubscribe_page(void){
2275 const char *zName = P("name");
2276 char *zErr = 0;
2277
--- src/alerts.c
+++ src/alerts.c
@@ -1831,11 +1831,11 @@
1831 ** The subscriber is identified in several ways:
1832 **
1833 ** * The name= query parameter contains the complete subscriberCode.
1834 ** This only happens when the user receives a verification
1835 ** email and clicks on the link in the email. When a
1836 ** complete subscriberCode is seen on the name= query parameter,
1837 ** that constitutes verification of the email address.
1838 **
1839 ** * The sid= query parameter contains an integer subscriberId.
1840 ** This only works for the administrator. It allows the
1841 ** administrator to edit any subscription.
@@ -2266,11 +2266,11 @@
2266 **
2267 ** Non-logged-in users with no name= query parameter are invited to enter
2268 ** an email address to which will be sent the unsubscribe link that
2269 ** contains the correct subscriber code.
2270 **
2271 ** The /unsubscribe page requires confirmation. The /oneclickunsub
2272 ** page unsubscribes immediately without any need to confirm.
2273 */
2274 void unsubscribe_page(void){
2275 const char *zName = P("name");
2276 char *zErr = 0;
2277
+10 -6
--- src/blob.c
+++ src/blob.c
@@ -872,15 +872,15 @@
872872
char *aData = pFrom->aData;
873873
int n = pFrom->nUsed;
874874
int i = pFrom->iCursor;
875875
while( i<n && fossil_isspace(aData[i]) ){ i++; }
876876
pFrom->iCursor = i;
877
- if( aData[i]=='\'' ){
877
+ if( i<n && aData[i]=='\'' ){
878878
i++;
879879
while( i<n ){
880880
if( aData[i]=='\'' ){
881
- if( aData[++i]!='\'' ) break;
881
+ if( ++i>=n || aData[i]!='\'' ) break;
882882
}
883883
i++;
884884
}
885885
}else{
886886
while( i<n && !fossil_isspace(aData[i]) ){ i++; }
@@ -1335,11 +1335,12 @@
13351335
nWrote = fossil_utf8_to_console(blob_buffer(pBlob), blob_size(pBlob), 0);
13361336
if( nWrote>=0 ) return nWrote;
13371337
fflush(stdout);
13381338
_setmode(_fileno(stdout), _O_BINARY);
13391339
#endif
1340
- nWrote = fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), stdout);
1340
+ nWrote = blob_size(pBlob)>0
1341
+ ? fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), stdout) : 0;
13411342
#if defined(_WIN32)
13421343
fflush(stdout);
13431344
_setmode(_fileno(stdout), _O_TEXT);
13441345
#endif
13451346
}else{
@@ -1356,11 +1357,12 @@
13561357
fossil_fatal_recursive("unable to open file \"%s\" for writing",
13571358
zFilename);
13581359
return 0;
13591360
}
13601361
blob_is_init(pBlob);
1361
- nWrote = fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), out);
1362
+ nWrote = blob_size(pBlob)>0
1363
+ ? fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), out) : 0;
13621364
fclose(out);
13631365
if( nWrote!=(int)blob_size(pBlob) ){
13641366
fossil_fatal_recursive("short write: %d of %d bytes to %s", nWrote,
13651367
blob_size(pBlob), zFilename);
13661368
}
@@ -1486,10 +1488,12 @@
14861488
/*
14871489
** Uncompress blob pIn and store the result in pOut. It is ok for pIn and
14881490
** pOut to be the same blob.
14891491
**
14901492
** pOut must be either uninitialized or the same as pIn.
1493
+**
1494
+** Return the number of errors encountered, which means return 0 on success.
14911495
*/
14921496
int blob_uncompress(Blob *pIn, Blob *pOut){
14931497
unsigned int nOut;
14941498
unsigned char *inBuf;
14951499
unsigned int nIn = blob_size(pIn);
@@ -1500,11 +1504,11 @@
15001504
return 0;
15011505
}
15021506
inBuf = (unsigned char*)blob_buffer(pIn);
15031507
nOut = (inBuf[0]<<24) + (inBuf[1]<<16) + (inBuf[2]<<8) + inBuf[3];
15041508
blob_zero(&temp);
1505
- blob_resize(&temp, nOut+1);
1509
+ blob_resize(&temp, (u64)nOut+1);
15061510
nOut2 = (long int)nOut;
15071511
rc = uncompress((unsigned char*)blob_buffer(&temp), &nOut2,
15081512
&inBuf[4], nIn - 4);
15091513
if( rc!=Z_OK ){
15101514
blob_reset(&temp);
@@ -1853,11 +1857,11 @@
18531857
** --hex HEX Skip the --hex flag and instead decode HEX
18541858
** into ascii. This provides a way to insert
18551859
** unusual characters as an argument for testing.
18561860
**
18571861
** --compare HEX ASCII Verify that argument ASCII is identical to
1858
-** to decoded HEX.
1862
+** decoded HEX.
18591863
**
18601864
** --fuzz N Run N fuzz cases. Each case is a call
18611865
** to "fossil test-escaped-arg --compare HEX ARG"
18621866
** where HEX and ARG are the same argument.
18631867
** The argument is chosen at random.
18641868
--- src/blob.c
+++ src/blob.c
@@ -872,15 +872,15 @@
872 char *aData = pFrom->aData;
873 int n = pFrom->nUsed;
874 int i = pFrom->iCursor;
875 while( i<n && fossil_isspace(aData[i]) ){ i++; }
876 pFrom->iCursor = i;
877 if( aData[i]=='\'' ){
878 i++;
879 while( i<n ){
880 if( aData[i]=='\'' ){
881 if( aData[++i]!='\'' ) break;
882 }
883 i++;
884 }
885 }else{
886 while( i<n && !fossil_isspace(aData[i]) ){ i++; }
@@ -1335,11 +1335,12 @@
1335 nWrote = fossil_utf8_to_console(blob_buffer(pBlob), blob_size(pBlob), 0);
1336 if( nWrote>=0 ) return nWrote;
1337 fflush(stdout);
1338 _setmode(_fileno(stdout), _O_BINARY);
1339 #endif
1340 nWrote = fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), stdout);
 
1341 #if defined(_WIN32)
1342 fflush(stdout);
1343 _setmode(_fileno(stdout), _O_TEXT);
1344 #endif
1345 }else{
@@ -1356,11 +1357,12 @@
1356 fossil_fatal_recursive("unable to open file \"%s\" for writing",
1357 zFilename);
1358 return 0;
1359 }
1360 blob_is_init(pBlob);
1361 nWrote = fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), out);
 
1362 fclose(out);
1363 if( nWrote!=(int)blob_size(pBlob) ){
1364 fossil_fatal_recursive("short write: %d of %d bytes to %s", nWrote,
1365 blob_size(pBlob), zFilename);
1366 }
@@ -1486,10 +1488,12 @@
1486 /*
1487 ** Uncompress blob pIn and store the result in pOut. It is ok for pIn and
1488 ** pOut to be the same blob.
1489 **
1490 ** pOut must be either uninitialized or the same as pIn.
 
 
1491 */
1492 int blob_uncompress(Blob *pIn, Blob *pOut){
1493 unsigned int nOut;
1494 unsigned char *inBuf;
1495 unsigned int nIn = blob_size(pIn);
@@ -1500,11 +1504,11 @@
1500 return 0;
1501 }
1502 inBuf = (unsigned char*)blob_buffer(pIn);
1503 nOut = (inBuf[0]<<24) + (inBuf[1]<<16) + (inBuf[2]<<8) + inBuf[3];
1504 blob_zero(&temp);
1505 blob_resize(&temp, nOut+1);
1506 nOut2 = (long int)nOut;
1507 rc = uncompress((unsigned char*)blob_buffer(&temp), &nOut2,
1508 &inBuf[4], nIn - 4);
1509 if( rc!=Z_OK ){
1510 blob_reset(&temp);
@@ -1853,11 +1857,11 @@
1853 ** --hex HEX Skip the --hex flag and instead decode HEX
1854 ** into ascii. This provides a way to insert
1855 ** unusual characters as an argument for testing.
1856 **
1857 ** --compare HEX ASCII Verify that argument ASCII is identical to
1858 ** to decoded HEX.
1859 **
1860 ** --fuzz N Run N fuzz cases. Each case is a call
1861 ** to "fossil test-escaped-arg --compare HEX ARG"
1862 ** where HEX and ARG are the same argument.
1863 ** The argument is chosen at random.
1864
--- src/blob.c
+++ src/blob.c
@@ -872,15 +872,15 @@
872 char *aData = pFrom->aData;
873 int n = pFrom->nUsed;
874 int i = pFrom->iCursor;
875 while( i<n && fossil_isspace(aData[i]) ){ i++; }
876 pFrom->iCursor = i;
877 if( i<n && aData[i]=='\'' ){
878 i++;
879 while( i<n ){
880 if( aData[i]=='\'' ){
881 if( ++i>=n || aData[i]!='\'' ) break;
882 }
883 i++;
884 }
885 }else{
886 while( i<n && !fossil_isspace(aData[i]) ){ i++; }
@@ -1335,11 +1335,12 @@
1335 nWrote = fossil_utf8_to_console(blob_buffer(pBlob), blob_size(pBlob), 0);
1336 if( nWrote>=0 ) return nWrote;
1337 fflush(stdout);
1338 _setmode(_fileno(stdout), _O_BINARY);
1339 #endif
1340 nWrote = blob_size(pBlob)>0
1341 ? fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), stdout) : 0;
1342 #if defined(_WIN32)
1343 fflush(stdout);
1344 _setmode(_fileno(stdout), _O_TEXT);
1345 #endif
1346 }else{
@@ -1356,11 +1357,12 @@
1357 fossil_fatal_recursive("unable to open file \"%s\" for writing",
1358 zFilename);
1359 return 0;
1360 }
1361 blob_is_init(pBlob);
1362 nWrote = blob_size(pBlob)>0
1363 ? fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), out) : 0;
1364 fclose(out);
1365 if( nWrote!=(int)blob_size(pBlob) ){
1366 fossil_fatal_recursive("short write: %d of %d bytes to %s", nWrote,
1367 blob_size(pBlob), zFilename);
1368 }
@@ -1486,10 +1488,12 @@
1488 /*
1489 ** Uncompress blob pIn and store the result in pOut. It is ok for pIn and
1490 ** pOut to be the same blob.
1491 **
1492 ** pOut must be either uninitialized or the same as pIn.
1493 **
1494 ** Return the number of errors encountered, which means return 0 on success.
1495 */
1496 int blob_uncompress(Blob *pIn, Blob *pOut){
1497 unsigned int nOut;
1498 unsigned char *inBuf;
1499 unsigned int nIn = blob_size(pIn);
@@ -1500,11 +1504,11 @@
1504 return 0;
1505 }
1506 inBuf = (unsigned char*)blob_buffer(pIn);
1507 nOut = (inBuf[0]<<24) + (inBuf[1]<<16) + (inBuf[2]<<8) + inBuf[3];
1508 blob_zero(&temp);
1509 blob_resize(&temp, (u64)nOut+1);
1510 nOut2 = (long int)nOut;
1511 rc = uncompress((unsigned char*)blob_buffer(&temp), &nOut2,
1512 &inBuf[4], nIn - 4);
1513 if( rc!=Z_OK ){
1514 blob_reset(&temp);
@@ -1853,11 +1857,11 @@
1857 ** --hex HEX Skip the --hex flag and instead decode HEX
1858 ** into ascii. This provides a way to insert
1859 ** unusual characters as an argument for testing.
1860 **
1861 ** --compare HEX ASCII Verify that argument ASCII is identical to
1862 ** decoded HEX.
1863 **
1864 ** --fuzz N Run N fuzz cases. Each case is a call
1865 ** to "fossil test-escaped-arg --compare HEX ARG"
1866 ** where HEX and ARG are the same argument.
1867 ** The argument is chosen at random.
1868
+1 -1
--- src/branch.c
+++ src/branch.c
@@ -629,11 +629,11 @@
629629
** Print the name of the branch for the current check-out
630630
**
631631
** > fossil branch hide|unhide ?OPTIONS? BRANCH-NAME ?...BRANCH-NAMES?
632632
**
633633
** Adds or cancels the "hidden" tag for the specified branches or
634
-** or check-in IDs. Accepts the same options as the close
634
+** check-in IDs. Accepts the same options as the close
635635
** subcommand.
636636
**
637637
** > fossil branch info BRANCH-NAME
638638
**
639639
** Print information about a branch
640640
--- src/branch.c
+++ src/branch.c
@@ -629,11 +629,11 @@
629 ** Print the name of the branch for the current check-out
630 **
631 ** > fossil branch hide|unhide ?OPTIONS? BRANCH-NAME ?...BRANCH-NAMES?
632 **
633 ** Adds or cancels the "hidden" tag for the specified branches or
634 ** or check-in IDs. Accepts the same options as the close
635 ** subcommand.
636 **
637 ** > fossil branch info BRANCH-NAME
638 **
639 ** Print information about a branch
640
--- src/branch.c
+++ src/branch.c
@@ -629,11 +629,11 @@
629 ** Print the name of the branch for the current check-out
630 **
631 ** > fossil branch hide|unhide ?OPTIONS? BRANCH-NAME ?...BRANCH-NAMES?
632 **
633 ** Adds or cancels the "hidden" tag for the specified branches or
634 ** check-in IDs. Accepts the same options as the close
635 ** subcommand.
636 **
637 ** > fossil branch info BRANCH-NAME
638 **
639 ** Print information about a branch
640
+8 -2
--- src/cgi.c
+++ src/cgi.c
@@ -710,11 +710,11 @@
710710
int rc;
711711
if( g.zBaseURL==0 ) return 0;
712712
zRef = P("HTTP_REFERER");
713713
if( zRef==0 ) return 0;
714714
if( strchr(zRef,'%')!=0 ){
715
- zToFree = strdup(zRef);
715
+ zToFree = fossil_strdup(zRef);
716716
dehttpize(zToFree);
717717
zRef = zToFree;
718718
}
719719
nBase = (int)strlen(g.zBaseURL);
720720
if( fossil_strncmp(g.zBaseURL,zRef,nBase)!=0 ){
@@ -722,11 +722,11 @@
722722
}else if( zRef[nBase]!=0 && zRef[nBase]!='/' ){
723723
rc = 0;
724724
}else{
725725
rc = 1;
726726
}
727
- if( rc==0 && bErrorLog && fossil_strcmp(P("REQUST_METHOD"),"POST")==0 ){
727
+ if( rc==0 && bErrorLog && fossil_strcmp(P("REQUEST_METHOD"),"POST")==0 ){
728728
fossil_errorlog("warning: POST from different origin");
729729
}
730730
fossil_free(zToFree);
731731
return rc;
732732
}
@@ -1092,10 +1092,11 @@
10921092
i += nBoundary;
10931093
break;
10941094
}
10951095
}
10961096
*pz = &z[i];
1097
+ *pLen -= i;
10971098
get_line_from_string(pz, pLen);
10981099
return z;
10991100
}
11001101
11011102
/*
@@ -2539,10 +2540,11 @@
25392540
int nRead;
25402541
int c, n, m;
25412542
25422543
assert( !g.httpUseSSL );
25432544
while( (c = fgetc(g.httpIn))!=EOF && fossil_isdigit((char)c) ){
2545
+ if( nHdr>=100000000 ) malformed_request("SCGI header too long");
25442546
nHdr = nHdr*10 + (char)c - '0';
25452547
}
25462548
if( nHdr<16 ) malformed_request("SCGI header too short");
25472549
zToFree = zHdr = fossil_malloc(nHdr);
25482550
nRead = (int)fread(zHdr, 1, nHdr, g.httpIn);
@@ -2981,10 +2983,14 @@
29812983
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
29822984
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0};
29832985
if( 7==sscanf(zDate, "%3[A-Za-z], %d %3[A-Za-z] %d %d:%d:%d", zIgnore,
29842986
&mday, zMonth, &year, &hour, &min, &sec)){
29852987
if( year > 1900 ) year -= 1900;
2988
+ if( year<70 || year>8099 || mday<1 || mday>31
2989
+ || hour<0 || hour>23 || min<0 || min>59 || sec<0 || sec>60 ){
2990
+ return 0;
2991
+ }
29862992
for(mon=0; azMonths[mon]; mon++){
29872993
if( !fossil_strncmp( azMonths[mon], zMonth, 3 )){
29882994
int nDay;
29892995
int isLeapYr;
29902996
static int priorDays[] =
29912997
--- src/cgi.c
+++ src/cgi.c
@@ -710,11 +710,11 @@
710 int rc;
711 if( g.zBaseURL==0 ) return 0;
712 zRef = P("HTTP_REFERER");
713 if( zRef==0 ) return 0;
714 if( strchr(zRef,'%')!=0 ){
715 zToFree = strdup(zRef);
716 dehttpize(zToFree);
717 zRef = zToFree;
718 }
719 nBase = (int)strlen(g.zBaseURL);
720 if( fossil_strncmp(g.zBaseURL,zRef,nBase)!=0 ){
@@ -722,11 +722,11 @@
722 }else if( zRef[nBase]!=0 && zRef[nBase]!='/' ){
723 rc = 0;
724 }else{
725 rc = 1;
726 }
727 if( rc==0 && bErrorLog && fossil_strcmp(P("REQUST_METHOD"),"POST")==0 ){
728 fossil_errorlog("warning: POST from different origin");
729 }
730 fossil_free(zToFree);
731 return rc;
732 }
@@ -1092,10 +1092,11 @@
1092 i += nBoundary;
1093 break;
1094 }
1095 }
1096 *pz = &z[i];
 
1097 get_line_from_string(pz, pLen);
1098 return z;
1099 }
1100
1101 /*
@@ -2539,10 +2540,11 @@
2539 int nRead;
2540 int c, n, m;
2541
2542 assert( !g.httpUseSSL );
2543 while( (c = fgetc(g.httpIn))!=EOF && fossil_isdigit((char)c) ){
 
2544 nHdr = nHdr*10 + (char)c - '0';
2545 }
2546 if( nHdr<16 ) malformed_request("SCGI header too short");
2547 zToFree = zHdr = fossil_malloc(nHdr);
2548 nRead = (int)fread(zHdr, 1, nHdr, g.httpIn);
@@ -2981,10 +2983,14 @@
2981 {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
2982 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0};
2983 if( 7==sscanf(zDate, "%3[A-Za-z], %d %3[A-Za-z] %d %d:%d:%d", zIgnore,
2984 &mday, zMonth, &year, &hour, &min, &sec)){
2985 if( year > 1900 ) year -= 1900;
 
 
 
 
2986 for(mon=0; azMonths[mon]; mon++){
2987 if( !fossil_strncmp( azMonths[mon], zMonth, 3 )){
2988 int nDay;
2989 int isLeapYr;
2990 static int priorDays[] =
2991
--- src/cgi.c
+++ src/cgi.c
@@ -710,11 +710,11 @@
710 int rc;
711 if( g.zBaseURL==0 ) return 0;
712 zRef = P("HTTP_REFERER");
713 if( zRef==0 ) return 0;
714 if( strchr(zRef,'%')!=0 ){
715 zToFree = fossil_strdup(zRef);
716 dehttpize(zToFree);
717 zRef = zToFree;
718 }
719 nBase = (int)strlen(g.zBaseURL);
720 if( fossil_strncmp(g.zBaseURL,zRef,nBase)!=0 ){
@@ -722,11 +722,11 @@
722 }else if( zRef[nBase]!=0 && zRef[nBase]!='/' ){
723 rc = 0;
724 }else{
725 rc = 1;
726 }
727 if( rc==0 && bErrorLog && fossil_strcmp(P("REQUEST_METHOD"),"POST")==0 ){
728 fossil_errorlog("warning: POST from different origin");
729 }
730 fossil_free(zToFree);
731 return rc;
732 }
@@ -1092,10 +1092,11 @@
1092 i += nBoundary;
1093 break;
1094 }
1095 }
1096 *pz = &z[i];
1097 *pLen -= i;
1098 get_line_from_string(pz, pLen);
1099 return z;
1100 }
1101
1102 /*
@@ -2539,10 +2540,11 @@
2540 int nRead;
2541 int c, n, m;
2542
2543 assert( !g.httpUseSSL );
2544 while( (c = fgetc(g.httpIn))!=EOF && fossil_isdigit((char)c) ){
2545 if( nHdr>=100000000 ) malformed_request("SCGI header too long");
2546 nHdr = nHdr*10 + (char)c - '0';
2547 }
2548 if( nHdr<16 ) malformed_request("SCGI header too short");
2549 zToFree = zHdr = fossil_malloc(nHdr);
2550 nRead = (int)fread(zHdr, 1, nHdr, g.httpIn);
@@ -2981,10 +2983,14 @@
2983 {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
2984 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0};
2985 if( 7==sscanf(zDate, "%3[A-Za-z], %d %3[A-Za-z] %d %d:%d:%d", zIgnore,
2986 &mday, zMonth, &year, &hour, &min, &sec)){
2987 if( year > 1900 ) year -= 1900;
2988 if( year<70 || year>8099 || mday<1 || mday>31
2989 || hour<0 || hour>23 || min<0 || min>59 || sec<0 || sec>60 ){
2990 return 0;
2991 }
2992 for(mon=0; azMonths[mon]; mon++){
2993 if( !fossil_strncmp( azMonths[mon], zMonth, 3 )){
2994 int nDay;
2995 int isLeapYr;
2996 static int priorDays[] =
2997
+9 -11
--- src/configure.c
+++ src/configure.c
@@ -299,37 +299,36 @@
299299
}
300300
rebuildMask = 0;
301301
}
302302
303303
/*
304
-** Return true if z[] is not a "safe" SQL token. A safe token is one of:
304
+** Return true if z[] is a "safe" SQL token. A safe token is one of:
305305
**
306306
** * A string literal
307307
** * A blob literal
308308
** * An integer literal (no floating point)
309309
** * NULL
310310
*/
311311
static int safeSql(const char *z){
312312
int i;
313313
if( z==0 || z[0]==0 ) return 0;
314
- if( (z[0]=='x' || z[0]=='X') && z[1]=='\'' ) z++;
314
+ if( (z[0]=='x' || z[0]=='X') && z[1]=='\'' ){
315
+ int n = (int)strlen(z);
316
+ return z[n-1]=='\'' && (n-3)%2==0 && validate16(&z[2], n-3);
317
+ }
315318
if( z[0]=='\'' ){
316319
for(i=1; z[i]; i++){
317320
if( z[i]=='\'' ){
318321
i++;
319322
if( z[i]=='\'' ){ continue; }
320323
return z[i]==0;
321324
}
322325
}
323326
return 0;
324
- }else{
325
- char c;
326
- for(i=0; (c = z[i])!=0; i++){
327
- if( !fossil_isalnum(c) ) return 0;
328
- }
329327
}
330
- return 1;
328
+ for(i=0; fossil_isdigit(z[i]); i++){}
329
+ return z[i]==0 || fossil_stricmp(z,"NULL")==0;
331330
}
332331
333332
/*
334333
** Return true if z[] consists of nothing but digits
335334
*/
@@ -411,11 +410,10 @@
411410
}
412411
if( ii>=count(aType) ) return;
413412
414413
while( blob_token(pContent, &name) && blob_sqltoken(pContent, &value) ){
415414
char *z = blob_terminate(&name);
416
- if( !safeSql(z) ) return;
417415
if( nToken>0 ){
418416
for(jj=0; jj<aType[ii].nField; jj++){
419417
if( fossil_strcmp(aType[ii].azField[jj], z)==0 ) break;
420418
}
421419
if( jj>=aType[ii].nField ) continue;
@@ -978,11 +976,11 @@
978976
** you are doing! The --unset option only works if there is a PATTERN.
979977
** Probably you should run the command once without --unset to make sure
980978
** you know exactly what is being deleted.
981979
**
982980
** If not in an open check-out, use the -R REPO option to specify a
983
-** a repository.
981
+** repository.
984982
*/
985983
void test_var_list_cmd(void){
986984
Stmt q;
987985
int i, j;
988986
const char *zPattern = 0;
@@ -1073,11 +1071,11 @@
10731071
** Write the text of the VAR variable into FILE. If FILE is "-"
10741072
** or is omitted then output goes to standard output. VAR can be a
10751073
** GLOB pattern.
10761074
**
10771075
** If not in an open check-out, use the -R REPO option to specify a
1078
-** a repository.
1076
+** repository.
10791077
*/
10801078
void test_var_get_cmd(void){
10811079
const char *zVar;
10821080
const char *zFile;
10831081
int n;
10841082
--- src/configure.c
+++ src/configure.c
@@ -299,37 +299,36 @@
299 }
300 rebuildMask = 0;
301 }
302
303 /*
304 ** Return true if z[] is not a "safe" SQL token. A safe token is one of:
305 **
306 ** * A string literal
307 ** * A blob literal
308 ** * An integer literal (no floating point)
309 ** * NULL
310 */
311 static int safeSql(const char *z){
312 int i;
313 if( z==0 || z[0]==0 ) return 0;
314 if( (z[0]=='x' || z[0]=='X') && z[1]=='\'' ) z++;
 
 
 
315 if( z[0]=='\'' ){
316 for(i=1; z[i]; i++){
317 if( z[i]=='\'' ){
318 i++;
319 if( z[i]=='\'' ){ continue; }
320 return z[i]==0;
321 }
322 }
323 return 0;
324 }else{
325 char c;
326 for(i=0; (c = z[i])!=0; i++){
327 if( !fossil_isalnum(c) ) return 0;
328 }
329 }
330 return 1;
 
331 }
332
333 /*
334 ** Return true if z[] consists of nothing but digits
335 */
@@ -411,11 +410,10 @@
411 }
412 if( ii>=count(aType) ) return;
413
414 while( blob_token(pContent, &name) && blob_sqltoken(pContent, &value) ){
415 char *z = blob_terminate(&name);
416 if( !safeSql(z) ) return;
417 if( nToken>0 ){
418 for(jj=0; jj<aType[ii].nField; jj++){
419 if( fossil_strcmp(aType[ii].azField[jj], z)==0 ) break;
420 }
421 if( jj>=aType[ii].nField ) continue;
@@ -978,11 +976,11 @@
978 ** you are doing! The --unset option only works if there is a PATTERN.
979 ** Probably you should run the command once without --unset to make sure
980 ** you know exactly what is being deleted.
981 **
982 ** If not in an open check-out, use the -R REPO option to specify a
983 ** a repository.
984 */
985 void test_var_list_cmd(void){
986 Stmt q;
987 int i, j;
988 const char *zPattern = 0;
@@ -1073,11 +1071,11 @@
1073 ** Write the text of the VAR variable into FILE. If FILE is "-"
1074 ** or is omitted then output goes to standard output. VAR can be a
1075 ** GLOB pattern.
1076 **
1077 ** If not in an open check-out, use the -R REPO option to specify a
1078 ** a repository.
1079 */
1080 void test_var_get_cmd(void){
1081 const char *zVar;
1082 const char *zFile;
1083 int n;
1084
--- src/configure.c
+++ src/configure.c
@@ -299,37 +299,36 @@
299 }
300 rebuildMask = 0;
301 }
302
303 /*
304 ** Return true if z[] is a "safe" SQL token. A safe token is one of:
305 **
306 ** * A string literal
307 ** * A blob literal
308 ** * An integer literal (no floating point)
309 ** * NULL
310 */
311 static int safeSql(const char *z){
312 int i;
313 if( z==0 || z[0]==0 ) return 0;
314 if( (z[0]=='x' || z[0]=='X') && z[1]=='\'' ){
315 int n = (int)strlen(z);
316 return z[n-1]=='\'' && (n-3)%2==0 && validate16(&z[2], n-3);
317 }
318 if( z[0]=='\'' ){
319 for(i=1; z[i]; i++){
320 if( z[i]=='\'' ){
321 i++;
322 if( z[i]=='\'' ){ continue; }
323 return z[i]==0;
324 }
325 }
326 return 0;
 
 
 
 
 
327 }
328 for(i=0; fossil_isdigit(z[i]); i++){}
329 return z[i]==0 || fossil_stricmp(z,"NULL")==0;
330 }
331
332 /*
333 ** Return true if z[] consists of nothing but digits
334 */
@@ -411,11 +410,10 @@
410 }
411 if( ii>=count(aType) ) return;
412
413 while( blob_token(pContent, &name) && blob_sqltoken(pContent, &value) ){
414 char *z = blob_terminate(&name);
 
415 if( nToken>0 ){
416 for(jj=0; jj<aType[ii].nField; jj++){
417 if( fossil_strcmp(aType[ii].azField[jj], z)==0 ) break;
418 }
419 if( jj>=aType[ii].nField ) continue;
@@ -978,11 +976,11 @@
976 ** you are doing! The --unset option only works if there is a PATTERN.
977 ** Probably you should run the command once without --unset to make sure
978 ** you know exactly what is being deleted.
979 **
980 ** If not in an open check-out, use the -R REPO option to specify a
981 ** repository.
982 */
983 void test_var_list_cmd(void){
984 Stmt q;
985 int i, j;
986 const char *zPattern = 0;
@@ -1073,11 +1071,11 @@
1071 ** Write the text of the VAR variable into FILE. If FILE is "-"
1072 ** or is omitted then output goes to standard output. VAR can be a
1073 ** GLOB pattern.
1074 **
1075 ** If not in an open check-out, use the -R REPO option to specify a
1076 ** repository.
1077 */
1078 void test_var_get_cmd(void){
1079 const char *zVar;
1080 const char *zFile;
1081 int n;
1082
+3 -3
--- src/content.c
+++ src/content.c
@@ -703,11 +703,11 @@
703703
/*
704704
** COMMAND: test-content-put
705705
**
706706
** Usage: %fossil test-content-put [OPTIONS] FILE ...
707707
**
708
-** Read the content of all FILE argments and add them to the Blob
708
+** Read the content of all FILE arguments and add them to the Blob
709709
** table as a new artifact using a direct call to content_put().
710710
**
711711
** Options:
712712
**
713713
** --moderate Make corresponding entries to the MODREQ table
@@ -951,13 +951,13 @@
951951
}
952952
953953
/*
954954
** COMMAND: test-content-deltify
955955
**
956
-** Usage: %fossil RID SRCID SRCID ... [-force]
956
+** Usage: %fossil test-content-deltify [--force] RID SRCID SRCID...
957957
**
958
-** Convert the content at RID into a delta one of the from SRCIDs.
958
+** Convert the content at RID into a delta from one of the SRCIDs.
959959
*/
960960
void test_content_deltify_cmd(void){
961961
int nSrc;
962962
int *aSrc;
963963
int i;
964964
--- src/content.c
+++ src/content.c
@@ -703,11 +703,11 @@
703 /*
704 ** COMMAND: test-content-put
705 **
706 ** Usage: %fossil test-content-put [OPTIONS] FILE ...
707 **
708 ** Read the content of all FILE argments and add them to the Blob
709 ** table as a new artifact using a direct call to content_put().
710 **
711 ** Options:
712 **
713 ** --moderate Make corresponding entries to the MODREQ table
@@ -951,13 +951,13 @@
951 }
952
953 /*
954 ** COMMAND: test-content-deltify
955 **
956 ** Usage: %fossil RID SRCID SRCID ... [-force]
957 **
958 ** Convert the content at RID into a delta one of the from SRCIDs.
959 */
960 void test_content_deltify_cmd(void){
961 int nSrc;
962 int *aSrc;
963 int i;
964
--- src/content.c
+++ src/content.c
@@ -703,11 +703,11 @@
703 /*
704 ** COMMAND: test-content-put
705 **
706 ** Usage: %fossil test-content-put [OPTIONS] FILE ...
707 **
708 ** Read the content of all FILE arguments and add them to the Blob
709 ** table as a new artifact using a direct call to content_put().
710 **
711 ** Options:
712 **
713 ** --moderate Make corresponding entries to the MODREQ table
@@ -951,13 +951,13 @@
951 }
952
953 /*
954 ** COMMAND: test-content-deltify
955 **
956 ** Usage: %fossil test-content-deltify [--force] RID SRCID SRCID...
957 **
958 ** Convert the content at RID into a delta from one of the SRCIDs.
959 */
960 void test_content_deltify_cmd(void){
961 int nSrc;
962 int *aSrc;
963 int i;
964
+2 -2
--- src/db.c
+++ src/db.c
@@ -1787,11 +1787,11 @@
17871787
}
17881788
17891789
/*
17901790
** WEBPAGE: setseekey
17911791
**
1792
-** Sets the sets the saved database encryption key to one that gets passed
1792
+** Sets the saved database encryption key to one that gets passed
17931793
** via the "key" query string parameter. If the saved database encryption
17941794
** key has already been set, does nothing. This web page does not produce
17951795
** any output on success or failure. No permissions are required and none
17961796
** are checked (partially due to lack of encrypted database access).
17971797
**
@@ -4648,11 +4648,11 @@
46484648
** not a robot. Details depend on the value of the setting.
46494649
**
46504650
** (0) Off: No adjustments are made to the 'h' privilege based on
46514651
** the user agent.
46524652
**
4653
-** (1) UserAgent and Javascript: The the href= values of hyperlinks
4653
+** (1) UserAgent and Javascript: The href= values of hyperlinks
46544654
** initially point to /honeypot and are changed to point to the
46554655
** correct target by javascript that runs after the page loads.
46564656
** The auto-hyperlink-delay and auto-hyperlink-mouseover settings
46574657
** influence that javascript.
46584658
**
46594659
--- src/db.c
+++ src/db.c
@@ -1787,11 +1787,11 @@
1787 }
1788
1789 /*
1790 ** WEBPAGE: setseekey
1791 **
1792 ** Sets the sets the saved database encryption key to one that gets passed
1793 ** via the "key" query string parameter. If the saved database encryption
1794 ** key has already been set, does nothing. This web page does not produce
1795 ** any output on success or failure. No permissions are required and none
1796 ** are checked (partially due to lack of encrypted database access).
1797 **
@@ -4648,11 +4648,11 @@
4648 ** not a robot. Details depend on the value of the setting.
4649 **
4650 ** (0) Off: No adjustments are made to the 'h' privilege based on
4651 ** the user agent.
4652 **
4653 ** (1) UserAgent and Javascript: The the href= values of hyperlinks
4654 ** initially point to /honeypot and are changed to point to the
4655 ** correct target by javascript that runs after the page loads.
4656 ** The auto-hyperlink-delay and auto-hyperlink-mouseover settings
4657 ** influence that javascript.
4658 **
4659
--- src/db.c
+++ src/db.c
@@ -1787,11 +1787,11 @@
1787 }
1788
1789 /*
1790 ** WEBPAGE: setseekey
1791 **
1792 ** Sets the saved database encryption key to one that gets passed
1793 ** via the "key" query string parameter. If the saved database encryption
1794 ** key has already been set, does nothing. This web page does not produce
1795 ** any output on success or failure. No permissions are required and none
1796 ** are checked (partially due to lack of encrypted database access).
1797 **
@@ -4648,11 +4648,11 @@
4648 ** not a robot. Details depend on the value of the setting.
4649 **
4650 ** (0) Off: No adjustments are made to the 'h' privilege based on
4651 ** the user agent.
4652 **
4653 ** (1) UserAgent and Javascript: The href= values of hyperlinks
4654 ** initially point to /honeypot and are changed to point to the
4655 ** correct target by javascript that runs after the page loads.
4656 ** The auto-hyperlink-delay and auto-hyperlink-mouseover settings
4657 ** influence that javascript.
4658 **
4659
+15 -10
--- src/deltacmd.c
+++ src/deltacmd.c
@@ -115,28 +115,33 @@
115115
** routine.
116116
**
117117
** It works ok for pTarget and pOriginal to be the same blob.
118118
**
119119
** Return the length of the target. Return -1 if there is an error.
120
+** On error pTarget is still initialized, to an empty blob, and if
121
+** pTarget and pOriginal are the same blob then pOriginal is reset.
120122
*/
121123
int blob_delta_apply(Blob *pOriginal, Blob *pDelta, Blob *pTarget){
122124
int len;
123125
sqlite3_int64 n;
124126
Blob out;
125127
126128
n = delta_output_size(blob_buffer(pDelta), blob_size(pDelta));
127129
blob_zero(&out);
128
- if( n<0 || n>0x7fffffff ) return -1;
129
- blob_resize(&out, n);
130
- len = delta_apply(
131
- blob_buffer(pOriginal), blob_size(pOriginal),
132
- blob_buffer(pDelta), blob_size(pDelta),
133
- blob_buffer(&out));
134
- if( len<0 ){
135
- blob_reset(&out);
136
- }else if( len!=n ){
137
- blob_resize(&out, len);
130
+ if( n<0 || n>0x7fffffff ){
131
+ len = -1;
132
+ }else{
133
+ blob_resize(&out, n);
134
+ len = delta_apply(
135
+ blob_buffer(pOriginal), blob_size(pOriginal),
136
+ blob_buffer(pDelta), blob_size(pDelta),
137
+ blob_buffer(&out));
138
+ if( len<0 ){
139
+ blob_reset(&out);
140
+ }else if( len!=n ){
141
+ blob_resize(&out, len);
142
+ }
138143
}
139144
if( pTarget==pOriginal ){
140145
blob_reset(pOriginal);
141146
}
142147
*pTarget = out;
143148
--- src/deltacmd.c
+++ src/deltacmd.c
@@ -115,28 +115,33 @@
115 ** routine.
116 **
117 ** It works ok for pTarget and pOriginal to be the same blob.
118 **
119 ** Return the length of the target. Return -1 if there is an error.
 
 
120 */
121 int blob_delta_apply(Blob *pOriginal, Blob *pDelta, Blob *pTarget){
122 int len;
123 sqlite3_int64 n;
124 Blob out;
125
126 n = delta_output_size(blob_buffer(pDelta), blob_size(pDelta));
127 blob_zero(&out);
128 if( n<0 || n>0x7fffffff ) return -1;
129 blob_resize(&out, n);
130 len = delta_apply(
131 blob_buffer(pOriginal), blob_size(pOriginal),
132 blob_buffer(pDelta), blob_size(pDelta),
133 blob_buffer(&out));
134 if( len<0 ){
135 blob_reset(&out);
136 }else if( len!=n ){
137 blob_resize(&out, len);
 
 
 
138 }
139 if( pTarget==pOriginal ){
140 blob_reset(pOriginal);
141 }
142 *pTarget = out;
143
--- src/deltacmd.c
+++ src/deltacmd.c
@@ -115,28 +115,33 @@
115 ** routine.
116 **
117 ** It works ok for pTarget and pOriginal to be the same blob.
118 **
119 ** Return the length of the target. Return -1 if there is an error.
120 ** On error pTarget is still initialized, to an empty blob, and if
121 ** pTarget and pOriginal are the same blob then pOriginal is reset.
122 */
123 int blob_delta_apply(Blob *pOriginal, Blob *pDelta, Blob *pTarget){
124 int len;
125 sqlite3_int64 n;
126 Blob out;
127
128 n = delta_output_size(blob_buffer(pDelta), blob_size(pDelta));
129 blob_zero(&out);
130 if( n<0 || n>0x7fffffff ){
131 len = -1;
132 }else{
133 blob_resize(&out, n);
134 len = delta_apply(
135 blob_buffer(pOriginal), blob_size(pOriginal),
136 blob_buffer(pDelta), blob_size(pDelta),
137 blob_buffer(&out));
138 if( len<0 ){
139 blob_reset(&out);
140 }else if( len!=n ){
141 blob_resize(&out, len);
142 }
143 }
144 if( pTarget==pOriginal ){
145 blob_reset(pOriginal);
146 }
147 *pTarget = out;
148
+1 -1
--- src/diff.c
+++ src/diff.c
@@ -958,11 +958,11 @@
958958
improveReadability(zLeft, zRight, p);
959959
}
960960
961961
/*
962962
** COMMAND: test-line-diff
963
-** Usage: %fossil% test-line-diff STRING1 STRING2
963
+** Usage: %fossil test-line-diff STRING1 STRING2
964964
**
965965
** Show the differences between the two strings. Used for testing
966966
** the oneLineChange() routine in the diff logic.
967967
*/
968968
void test_line_diff(void){
969969
--- src/diff.c
+++ src/diff.c
@@ -958,11 +958,11 @@
958 improveReadability(zLeft, zRight, p);
959 }
960
961 /*
962 ** COMMAND: test-line-diff
963 ** Usage: %fossil% test-line-diff STRING1 STRING2
964 **
965 ** Show the differences between the two strings. Used for testing
966 ** the oneLineChange() routine in the diff logic.
967 */
968 void test_line_diff(void){
969
--- src/diff.c
+++ src/diff.c
@@ -958,11 +958,11 @@
958 improveReadability(zLeft, zRight, p);
959 }
960
961 /*
962 ** COMMAND: test-line-diff
963 ** Usage: %fossil test-line-diff STRING1 STRING2
964 **
965 ** Show the differences between the two strings. Used for testing
966 ** the oneLineChange() routine in the diff logic.
967 */
968 void test_line_diff(void){
969
+2 -2
--- src/dispatch.c
+++ src/dispatch.c
@@ -865,11 +865,11 @@
865865
** the main web server.
866866
**
867867
** Query parameters:
868868
**
869869
** name=CMD Show help for CMD where CMD is a command name or
870
-** or setting name. If CMD beings with "/" it is
870
+** setting name. If CMD begins with "/" it is
871871
** interpreted as a PAGE name.
872872
**
873873
** name=www/PAGE Show help for web page PAGE.
874874
**
875875
** name=/PAGE The initial "www/" on web-page help can be abbreviated as
@@ -1459,11 +1459,11 @@
14591459
** --utc Display times using UTC
14601460
** --vfs NAME Cause SQLite to use the NAME VFS
14611461
**
14621462
** Additional options available on most commands that use network I/O:
14631463
**
1464
-** --accept-any-cert Disable server SSL cdert validation. Accept any SSL
1464
+** --accept-any-cert Disable server SSL cert validation. Accept any SSL
14651465
** cert that the server provides. WARNING: Unsafe!
14661466
** Testing and debugging use only!
14671467
** --ipv4 Use only IPv4. Disable IPv6 support.
14681468
** --ipv6 Use only IPv6. Disable IPv4 support.
14691469
** --nosync Disable autosync for the current command.
14701470
--- src/dispatch.c
+++ src/dispatch.c
@@ -865,11 +865,11 @@
865 ** the main web server.
866 **
867 ** Query parameters:
868 **
869 ** name=CMD Show help for CMD where CMD is a command name or
870 ** or setting name. If CMD beings with "/" it is
871 ** interpreted as a PAGE name.
872 **
873 ** name=www/PAGE Show help for web page PAGE.
874 **
875 ** name=/PAGE The initial "www/" on web-page help can be abbreviated as
@@ -1459,11 +1459,11 @@
1459 ** --utc Display times using UTC
1460 ** --vfs NAME Cause SQLite to use the NAME VFS
1461 **
1462 ** Additional options available on most commands that use network I/O:
1463 **
1464 ** --accept-any-cert Disable server SSL cdert validation. Accept any SSL
1465 ** cert that the server provides. WARNING: Unsafe!
1466 ** Testing and debugging use only!
1467 ** --ipv4 Use only IPv4. Disable IPv6 support.
1468 ** --ipv6 Use only IPv6. Disable IPv4 support.
1469 ** --nosync Disable autosync for the current command.
1470
--- src/dispatch.c
+++ src/dispatch.c
@@ -865,11 +865,11 @@
865 ** the main web server.
866 **
867 ** Query parameters:
868 **
869 ** name=CMD Show help for CMD where CMD is a command name or
870 ** setting name. If CMD begins with "/" it is
871 ** interpreted as a PAGE name.
872 **
873 ** name=www/PAGE Show help for web page PAGE.
874 **
875 ** name=/PAGE The initial "www/" on web-page help can be abbreviated as
@@ -1459,11 +1459,11 @@
1459 ** --utc Display times using UTC
1460 ** --vfs NAME Cause SQLite to use the NAME VFS
1461 **
1462 ** Additional options available on most commands that use network I/O:
1463 **
1464 ** --accept-any-cert Disable server SSL cert validation. Accept any SSL
1465 ** cert that the server provides. WARNING: Unsafe!
1466 ** Testing and debugging use only!
1467 ** --ipv4 Use only IPv4. Disable IPv6 support.
1468 ** --ipv6 Use only IPv6. Disable IPv4 support.
1469 ** --nosync Disable autosync for the current command.
1470
+1 -3
--- src/encode.c
+++ src/encode.c
@@ -788,13 +788,11 @@
788788
if( nIn<0 ) nIn = (int)strlen(zIn);
789789
if( zIn[nIn]==0 ){
790790
return (int)strspn(zIn,"0123456789abcdefABCDEF")==nIn;
791791
}
792792
for(i=0; i<nIn; i++, zIn++){
793
- if( zDecode[zIn[0]&0xff]>63 ){
794
- return zIn[0]==0;
795
- }
793
+ if( zDecode[zIn[0]&0xff]>63 ) return 0;
796794
}
797795
return 1;
798796
}
799797
800798
/*
801799
--- src/encode.c
+++ src/encode.c
@@ -788,13 +788,11 @@
788 if( nIn<0 ) nIn = (int)strlen(zIn);
789 if( zIn[nIn]==0 ){
790 return (int)strspn(zIn,"0123456789abcdefABCDEF")==nIn;
791 }
792 for(i=0; i<nIn; i++, zIn++){
793 if( zDecode[zIn[0]&0xff]>63 ){
794 return zIn[0]==0;
795 }
796 }
797 return 1;
798 }
799
800 /*
801
--- src/encode.c
+++ src/encode.c
@@ -788,13 +788,11 @@
788 if( nIn<0 ) nIn = (int)strlen(zIn);
789 if( zIn[nIn]==0 ){
790 return (int)strspn(zIn,"0123456789abcdefABCDEF")==nIn;
791 }
792 for(i=0; i<nIn; i++, zIn++){
793 if( zDecode[zIn[0]&0xff]>63 ) return 0;
 
 
794 }
795 return 1;
796 }
797
798 /*
799
+9 -2
--- src/file.c
+++ src/file.c
@@ -1252,11 +1252,18 @@
12521252
}
12531253
}
12541254
if( j>=0 ) z[j] = z[i];
12551255
j++;
12561256
}
1257
- if( j==0 ) z[j++] = '/';
1257
+ if( j<0 ){
1258
+ /* backup_dir() removed everything including the first component.
1259
+ ** Absolute "/.." still has z[0]=='/'; relative "a/.." is cwd. */
1260
+ if( z[0]=='/' ){ j = 0; z[j++] = '/'; }
1261
+ else { z[0] = '.'; j = 1; }
1262
+ }else if( j==0 ){
1263
+ z[j++] = '/';
1264
+ }
12581265
z[j] = 0;
12591266
return j;
12601267
}
12611268
12621269
/*
@@ -1465,11 +1472,11 @@
14651472
/*
14661473
** COMMAND: test-case-filename
14671474
**
14681475
** Usage: fossil test-case-filename DIRECTORY PATH PATH PATH ....
14691476
**
1470
-** All the PATH arguments (there must be one at least one) are pathnames
1477
+** All the PATH arguments (there must be at least one) are pathnames
14711478
** relative to DIRECTORY. This test command prints the OS-preferred name
14721479
** for each PATH in filesystems where case is not significant.
14731480
*/
14741481
void test_preferred_fn(void){
14751482
int i;
14761483
--- src/file.c
+++ src/file.c
@@ -1252,11 +1252,18 @@
1252 }
1253 }
1254 if( j>=0 ) z[j] = z[i];
1255 j++;
1256 }
1257 if( j==0 ) z[j++] = '/';
 
 
 
 
 
 
 
1258 z[j] = 0;
1259 return j;
1260 }
1261
1262 /*
@@ -1465,11 +1472,11 @@
1465 /*
1466 ** COMMAND: test-case-filename
1467 **
1468 ** Usage: fossil test-case-filename DIRECTORY PATH PATH PATH ....
1469 **
1470 ** All the PATH arguments (there must be one at least one) are pathnames
1471 ** relative to DIRECTORY. This test command prints the OS-preferred name
1472 ** for each PATH in filesystems where case is not significant.
1473 */
1474 void test_preferred_fn(void){
1475 int i;
1476
--- src/file.c
+++ src/file.c
@@ -1252,11 +1252,18 @@
1252 }
1253 }
1254 if( j>=0 ) z[j] = z[i];
1255 j++;
1256 }
1257 if( j<0 ){
1258 /* backup_dir() removed everything including the first component.
1259 ** Absolute "/.." still has z[0]=='/'; relative "a/.." is cwd. */
1260 if( z[0]=='/' ){ j = 0; z[j++] = '/'; }
1261 else { z[0] = '.'; j = 1; }
1262 }else if( j==0 ){
1263 z[j++] = '/';
1264 }
1265 z[j] = 0;
1266 return j;
1267 }
1268
1269 /*
@@ -1465,11 +1472,11 @@
1472 /*
1473 ** COMMAND: test-case-filename
1474 **
1475 ** Usage: fossil test-case-filename DIRECTORY PATH PATH PATH ....
1476 **
1477 ** All the PATH arguments (there must be at least one) are pathnames
1478 ** relative to DIRECTORY. This test command prints the OS-preferred name
1479 ** for each PATH in filesystems where case is not significant.
1480 */
1481 void test_preferred_fn(void){
1482 int i;
1483
+15 -7
--- src/forum.c
+++ src/forum.c
@@ -3471,19 +3471,27 @@
34713471
fossil_fatal("the --title option is required");
34723472
}
34733473
if( zFile==0 ){
34743474
fossil_fatal("the --content option is required");
34753475
}
3476
- if( zMarkup==0 || fossil_strcmp(zMarkup,"markdown")==0 ){
3477
- zMimetype = "text/x-markdown";
3478
- }else if( fossil_strcmp(zMarkup,"wiki")==0 ){
3479
- zMimetype = 0;
3480
- }else if( fossil_strcmp(zMarkup,"plaintext")==0 ){
3481
- zMimetype = "text/plain";
3482
- }else{
3476
+ if( zMarkup==0 ){
3477
+ zMimetype = wiki_guess_filename_mimetype(zFile, 0);
3478
+ if( !zMimetype ){
3479
+ fossil_fatal("Either use --markup <type> or a --content "
3480
+ "filename extension of (.md, .txt, .wiki) "
3481
+ "to specify the mime type.");
3482
+ zMimetype = DEFAULT_FORUM_MIMETYPE;
3483
+ }
3484
+ }else if( !wiki_is_valid_mimetype(zMarkup) ){
34833485
fossil_fatal("unknown --markup \"%s\". Should be one of: "
34843486
"markdown, wiki, plaintext", zMarkup);
3487
+ }else{
3488
+ zMimetype = wiki_filter_mimetypes(zMarkup)/*normalize short names*/;
3489
+ assert( zMimetype );
3490
+ }
3491
+ if( 0==fossil_strcmp(zMimetype, "text/x-fossil-wiki") ){
3492
+ zMimetype = 0 /* avoid setting N-card */;
34853493
}
34863494
if( fossil_strcmp(zFile,"-")==0 ){
34873495
blob_read_from_channel(&content, stdin, -1);
34883496
}else{
34893497
blob_read_from_file(&content, zFile, ExtFILE);
34903498
--- src/forum.c
+++ src/forum.c
@@ -3471,19 +3471,27 @@
3471 fossil_fatal("the --title option is required");
3472 }
3473 if( zFile==0 ){
3474 fossil_fatal("the --content option is required");
3475 }
3476 if( zMarkup==0 || fossil_strcmp(zMarkup,"markdown")==0 ){
3477 zMimetype = "text/x-markdown";
3478 }else if( fossil_strcmp(zMarkup,"wiki")==0 ){
3479 zMimetype = 0;
3480 }else if( fossil_strcmp(zMarkup,"plaintext")==0 ){
3481 zMimetype = "text/plain";
3482 }else{
 
 
3483 fossil_fatal("unknown --markup \"%s\". Should be one of: "
3484 "markdown, wiki, plaintext", zMarkup);
 
 
 
 
 
 
3485 }
3486 if( fossil_strcmp(zFile,"-")==0 ){
3487 blob_read_from_channel(&content, stdin, -1);
3488 }else{
3489 blob_read_from_file(&content, zFile, ExtFILE);
3490
--- src/forum.c
+++ src/forum.c
@@ -3471,19 +3471,27 @@
3471 fossil_fatal("the --title option is required");
3472 }
3473 if( zFile==0 ){
3474 fossil_fatal("the --content option is required");
3475 }
3476 if( zMarkup==0 ){
3477 zMimetype = wiki_guess_filename_mimetype(zFile, 0);
3478 if( !zMimetype ){
3479 fossil_fatal("Either use --markup <type> or a --content "
3480 "filename extension of (.md, .txt, .wiki) "
3481 "to specify the mime type.");
3482 zMimetype = DEFAULT_FORUM_MIMETYPE;
3483 }
3484 }else if( !wiki_is_valid_mimetype(zMarkup) ){
3485 fossil_fatal("unknown --markup \"%s\". Should be one of: "
3486 "markdown, wiki, plaintext", zMarkup);
3487 }else{
3488 zMimetype = wiki_filter_mimetypes(zMarkup)/*normalize short names*/;
3489 assert( zMimetype );
3490 }
3491 if( 0==fossil_strcmp(zMimetype, "text/x-fossil-wiki") ){
3492 zMimetype = 0 /* avoid setting N-card */;
3493 }
3494 if( fossil_strcmp(zFile,"-")==0 ){
3495 blob_read_from_channel(&content, stdin, -1);
3496 }else{
3497 blob_read_from_file(&content, zFile, ExtFILE);
3498
+60 -25
--- src/import.c
+++ src/import.c
@@ -105,11 +105,11 @@
105105
for(i=0; i<gg.nFile; i++){
106106
fossil_free(gg.aFile[i].zName);
107107
fossil_free(gg.aFile[i].zUuid);
108108
fossil_free(gg.aFile[i].zPrior);
109109
}
110
- memset(gg.aFile, 0, gg.nFile*sizeof(gg.aFile[0]));
110
+ if( gg.nFile ) memset(gg.aFile, 0, gg.nFile*sizeof(gg.aFile[0]));
111111
gg.nFile = 0;
112112
if( freeAll ){
113113
fossil_free(gg.zPrevBranch);
114114
fossil_free(gg.zPrevCheckin);
115115
fossil_free(gg.azMerge);
@@ -265,11 +265,11 @@
265265
char *aTCard[4]; /* Array of T cards for manifest */
266266
int nTCard = 0; /* Entries used in aTCard[] */
267267
Blob record, cksum;
268268
269269
import_prior_files();
270
- qsort(gg.aFile, gg.nFile, sizeof(gg.aFile[0]), mfile_cmp);
270
+ if( gg.nFile ) qsort(gg.aFile, gg.nFile, sizeof(gg.aFile[0]), mfile_cmp);
271271
blob_zero(&record);
272272
blob_appendf(&record, "C %F\n", gg.zComment);
273273
blob_appendf(&record, "D %s\n", gg.zDate);
274274
if( !g.fQuiet ){
275275
fossil_print("%.10s\r", gg.zDate);
@@ -1224,72 +1224,107 @@
12241224
}
12251225
db_reset(&getChanges);
12261226
db_finalize(&setRid);
12271227
}
12281228
1229
-static u64 svn_get_varint(const char **pz){
1229
+static u64 svn_get_varint(const char **pz, const char *zEnd){
12301230
unsigned int v = 0;
12311231
do{
1232
+ if( *pz>=zEnd ) fossil_fatal("Invalid svndiff0 format");
12321233
v = (v<<7) | ((*pz)[0]&0x7f);
12331234
}while( (*pz)++[0]&0x80 );
12341235
return v;
12351236
}
12361237
1238
+/*
1239
+** Apply the svndiff0 delta in pDiff to pSrc and write the result into
1240
+** pOut. Every offset and length is checked against the buffer it names
1241
+** before it is used.
1242
+*/
12371243
static void svn_apply_svndiff(Blob *pDiff, Blob *pSrc, Blob *pOut){
12381244
const char *zDiff = blob_buffer(pDiff);
1245
+ const char *zEnd = zDiff + blob_size(pDiff);
1246
+ u64 nSrc = blob_size(pSrc);
12391247
char *zOut;
12401248
if( blob_size(pDiff)<4 || memcmp(zDiff, "SVN", 4)!=0 ){
12411249
fossil_fatal("Invalid svndiff0 format");
12421250
}
12431251
zDiff += 4;
12441252
blob_zero(pOut);
1245
- while( zDiff<(blob_buffer(pDiff)+blob_size(pDiff)) ){
1246
- u64 lenOut, lenInst, lenData, lenOld;
1253
+ while( zDiff<zEnd ){
1254
+ u64 lenOut, lenInst, lenData, lenOld, lenLeft;
12471255
const char *zInst;
12481256
const char *zData;
1257
+ const char *zDataEnd;
12491258
1250
- u64 offSrc = svn_get_varint(&zDiff);
1251
- /*lenSrc =*/ svn_get_varint(&zDiff);
1252
- lenOut = svn_get_varint(&zDiff);
1253
- lenInst = svn_get_varint(&zDiff);
1254
- lenData = svn_get_varint(&zDiff);
1259
+ u64 offSrc = svn_get_varint(&zDiff, zEnd);
1260
+ /*lenSrc =*/ svn_get_varint(&zDiff, zEnd);
1261
+ lenOut = svn_get_varint(&zDiff, zEnd);
1262
+ lenInst = svn_get_varint(&zDiff, zEnd);
1263
+ lenData = svn_get_varint(&zDiff, zEnd);
1264
+ if( lenInst>(u64)(zEnd-zDiff) || lenData>(u64)(zEnd-zDiff)-lenInst ){
1265
+ fossil_fatal("Invalid svndiff0 format");
1266
+ }
12551267
zInst = zDiff;
12561268
zData = zInst+lenInst;
1269
+ zDataEnd = zData+lenData;
12571270
lenOld = blob_size(pOut);
12581271
blob_resize(pOut, lenOut+lenOld);
12591272
zOut = blob_buffer(pOut)+lenOld;
1273
+ lenLeft = lenOut;
12601274
while( zDiff<zInst+lenInst ){
12611275
u64 lenCpy = (*zDiff)&0x3f;
1276
+ u64 off = 0;
12621277
const char *zCpy;
1263
- switch( (*zDiff)&0xC0 ){
1278
+ int op = (*zDiff)&0xC0;
1279
+ zDiff++;
1280
+ if( lenCpy==0 ){
1281
+ lenCpy = svn_get_varint(&zDiff, zInst+lenInst);
1282
+ }
1283
+ if( op!=0x80 ){
1284
+ off = svn_get_varint(&zDiff, zInst+lenInst);
1285
+ }
1286
+ if( lenCpy>lenLeft ){
1287
+ fossil_fatal("Invalid svndiff0 format");
1288
+ }
1289
+ switch( op ){
12641290
case 0x00:
1265
- if( 0==blob_size(pSrc) ){
1291
+ if( 0==nSrc ){
12661292
/* https://fossil-scm.org/forum/forumpost/15d4b242bda2a108 */
12671293
fossil_fatal("Don't know how to handle NULL input. "
12681294
"Tip: do not use the --incremental flag "
12691295
"in the svn dump command.");
12701296
}
1271
- zCpy = blob_buffer(pSrc)+offSrc;
1297
+ if( offSrc>nSrc || off>nSrc-offSrc || lenCpy>nSrc-offSrc-off ){
1298
+ fossil_fatal("Invalid svndiff0 format");
1299
+ }
1300
+ zCpy = blob_buffer(pSrc)+offSrc+off;
1301
+ break;
1302
+ case 0x40:
1303
+ if( lenCpy>0 && off>=(u64)(zOut-blob_buffer(pOut)) ){
1304
+ fossil_fatal("Invalid svndiff0 format");
1305
+ }
1306
+ zCpy = blob_buffer(pOut)+off;
12721307
break;
1273
- case 0x40: zCpy = blob_buffer(pOut); break;
1274
- case 0x80: zCpy = zData; break;
1308
+ case 0x80:
1309
+ if( lenCpy>(u64)(zDataEnd-zData) ){
1310
+ fossil_fatal("Invalid svndiff0 format");
1311
+ }
1312
+ zCpy = zData;
1313
+ zData += lenCpy;
1314
+ break;
12751315
default: fossil_fatal("Invalid svndiff0 instruction");
12761316
}
1277
- zDiff++;
1278
- if( lenCpy==0 ){
1279
- lenCpy = svn_get_varint(&zDiff);
1280
- }
1281
- if( zCpy!=zData ){
1282
- zCpy += svn_get_varint(&zDiff);
1283
- }else{
1284
- zData += lenCpy;
1285
- }
1317
+ lenLeft -= lenCpy;
12861318
while( lenCpy-- > 0 ){
12871319
*zOut++ = *zCpy++;
12881320
}
12891321
}
1290
- zDiff += lenData;
1322
+ if( lenLeft!=0 ){
1323
+ fossil_fatal("Invalid svndiff0 format");
1324
+ }
1325
+ zDiff = zDataEnd;
12911326
}
12921327
}
12931328
12941329
/*
12951330
** Extract the branch or tag that the given path is on. Return the branch ID.
12961331
--- src/import.c
+++ src/import.c
@@ -105,11 +105,11 @@
105 for(i=0; i<gg.nFile; i++){
106 fossil_free(gg.aFile[i].zName);
107 fossil_free(gg.aFile[i].zUuid);
108 fossil_free(gg.aFile[i].zPrior);
109 }
110 memset(gg.aFile, 0, gg.nFile*sizeof(gg.aFile[0]));
111 gg.nFile = 0;
112 if( freeAll ){
113 fossil_free(gg.zPrevBranch);
114 fossil_free(gg.zPrevCheckin);
115 fossil_free(gg.azMerge);
@@ -265,11 +265,11 @@
265 char *aTCard[4]; /* Array of T cards for manifest */
266 int nTCard = 0; /* Entries used in aTCard[] */
267 Blob record, cksum;
268
269 import_prior_files();
270 qsort(gg.aFile, gg.nFile, sizeof(gg.aFile[0]), mfile_cmp);
271 blob_zero(&record);
272 blob_appendf(&record, "C %F\n", gg.zComment);
273 blob_appendf(&record, "D %s\n", gg.zDate);
274 if( !g.fQuiet ){
275 fossil_print("%.10s\r", gg.zDate);
@@ -1224,72 +1224,107 @@
1224 }
1225 db_reset(&getChanges);
1226 db_finalize(&setRid);
1227 }
1228
1229 static u64 svn_get_varint(const char **pz){
1230 unsigned int v = 0;
1231 do{
 
1232 v = (v<<7) | ((*pz)[0]&0x7f);
1233 }while( (*pz)++[0]&0x80 );
1234 return v;
1235 }
1236
 
 
 
 
 
1237 static void svn_apply_svndiff(Blob *pDiff, Blob *pSrc, Blob *pOut){
1238 const char *zDiff = blob_buffer(pDiff);
 
 
1239 char *zOut;
1240 if( blob_size(pDiff)<4 || memcmp(zDiff, "SVN", 4)!=0 ){
1241 fossil_fatal("Invalid svndiff0 format");
1242 }
1243 zDiff += 4;
1244 blob_zero(pOut);
1245 while( zDiff<(blob_buffer(pDiff)+blob_size(pDiff)) ){
1246 u64 lenOut, lenInst, lenData, lenOld;
1247 const char *zInst;
1248 const char *zData;
 
1249
1250 u64 offSrc = svn_get_varint(&zDiff);
1251 /*lenSrc =*/ svn_get_varint(&zDiff);
1252 lenOut = svn_get_varint(&zDiff);
1253 lenInst = svn_get_varint(&zDiff);
1254 lenData = svn_get_varint(&zDiff);
 
 
 
1255 zInst = zDiff;
1256 zData = zInst+lenInst;
 
1257 lenOld = blob_size(pOut);
1258 blob_resize(pOut, lenOut+lenOld);
1259 zOut = blob_buffer(pOut)+lenOld;
 
1260 while( zDiff<zInst+lenInst ){
1261 u64 lenCpy = (*zDiff)&0x3f;
 
1262 const char *zCpy;
1263 switch( (*zDiff)&0xC0 ){
 
 
 
 
 
 
 
 
 
 
 
1264 case 0x00:
1265 if( 0==blob_size(pSrc) ){
1266 /* https://fossil-scm.org/forum/forumpost/15d4b242bda2a108 */
1267 fossil_fatal("Don't know how to handle NULL input. "
1268 "Tip: do not use the --incremental flag "
1269 "in the svn dump command.");
1270 }
1271 zCpy = blob_buffer(pSrc)+offSrc;
 
 
 
 
 
 
 
 
 
1272 break;
1273 case 0x40: zCpy = blob_buffer(pOut); break;
1274 case 0x80: zCpy = zData; break;
 
 
 
 
 
1275 default: fossil_fatal("Invalid svndiff0 instruction");
1276 }
1277 zDiff++;
1278 if( lenCpy==0 ){
1279 lenCpy = svn_get_varint(&zDiff);
1280 }
1281 if( zCpy!=zData ){
1282 zCpy += svn_get_varint(&zDiff);
1283 }else{
1284 zData += lenCpy;
1285 }
1286 while( lenCpy-- > 0 ){
1287 *zOut++ = *zCpy++;
1288 }
1289 }
1290 zDiff += lenData;
 
 
 
1291 }
1292 }
1293
1294 /*
1295 ** Extract the branch or tag that the given path is on. Return the branch ID.
1296
--- src/import.c
+++ src/import.c
@@ -105,11 +105,11 @@
105 for(i=0; i<gg.nFile; i++){
106 fossil_free(gg.aFile[i].zName);
107 fossil_free(gg.aFile[i].zUuid);
108 fossil_free(gg.aFile[i].zPrior);
109 }
110 if( gg.nFile ) memset(gg.aFile, 0, gg.nFile*sizeof(gg.aFile[0]));
111 gg.nFile = 0;
112 if( freeAll ){
113 fossil_free(gg.zPrevBranch);
114 fossil_free(gg.zPrevCheckin);
115 fossil_free(gg.azMerge);
@@ -265,11 +265,11 @@
265 char *aTCard[4]; /* Array of T cards for manifest */
266 int nTCard = 0; /* Entries used in aTCard[] */
267 Blob record, cksum;
268
269 import_prior_files();
270 if( gg.nFile ) qsort(gg.aFile, gg.nFile, sizeof(gg.aFile[0]), mfile_cmp);
271 blob_zero(&record);
272 blob_appendf(&record, "C %F\n", gg.zComment);
273 blob_appendf(&record, "D %s\n", gg.zDate);
274 if( !g.fQuiet ){
275 fossil_print("%.10s\r", gg.zDate);
@@ -1224,72 +1224,107 @@
1224 }
1225 db_reset(&getChanges);
1226 db_finalize(&setRid);
1227 }
1228
1229 static u64 svn_get_varint(const char **pz, const char *zEnd){
1230 unsigned int v = 0;
1231 do{
1232 if( *pz>=zEnd ) fossil_fatal("Invalid svndiff0 format");
1233 v = (v<<7) | ((*pz)[0]&0x7f);
1234 }while( (*pz)++[0]&0x80 );
1235 return v;
1236 }
1237
1238 /*
1239 ** Apply the svndiff0 delta in pDiff to pSrc and write the result into
1240 ** pOut. Every offset and length is checked against the buffer it names
1241 ** before it is used.
1242 */
1243 static void svn_apply_svndiff(Blob *pDiff, Blob *pSrc, Blob *pOut){
1244 const char *zDiff = blob_buffer(pDiff);
1245 const char *zEnd = zDiff + blob_size(pDiff);
1246 u64 nSrc = blob_size(pSrc);
1247 char *zOut;
1248 if( blob_size(pDiff)<4 || memcmp(zDiff, "SVN", 4)!=0 ){
1249 fossil_fatal("Invalid svndiff0 format");
1250 }
1251 zDiff += 4;
1252 blob_zero(pOut);
1253 while( zDiff<zEnd ){
1254 u64 lenOut, lenInst, lenData, lenOld, lenLeft;
1255 const char *zInst;
1256 const char *zData;
1257 const char *zDataEnd;
1258
1259 u64 offSrc = svn_get_varint(&zDiff, zEnd);
1260 /*lenSrc =*/ svn_get_varint(&zDiff, zEnd);
1261 lenOut = svn_get_varint(&zDiff, zEnd);
1262 lenInst = svn_get_varint(&zDiff, zEnd);
1263 lenData = svn_get_varint(&zDiff, zEnd);
1264 if( lenInst>(u64)(zEnd-zDiff) || lenData>(u64)(zEnd-zDiff)-lenInst ){
1265 fossil_fatal("Invalid svndiff0 format");
1266 }
1267 zInst = zDiff;
1268 zData = zInst+lenInst;
1269 zDataEnd = zData+lenData;
1270 lenOld = blob_size(pOut);
1271 blob_resize(pOut, lenOut+lenOld);
1272 zOut = blob_buffer(pOut)+lenOld;
1273 lenLeft = lenOut;
1274 while( zDiff<zInst+lenInst ){
1275 u64 lenCpy = (*zDiff)&0x3f;
1276 u64 off = 0;
1277 const char *zCpy;
1278 int op = (*zDiff)&0xC0;
1279 zDiff++;
1280 if( lenCpy==0 ){
1281 lenCpy = svn_get_varint(&zDiff, zInst+lenInst);
1282 }
1283 if( op!=0x80 ){
1284 off = svn_get_varint(&zDiff, zInst+lenInst);
1285 }
1286 if( lenCpy>lenLeft ){
1287 fossil_fatal("Invalid svndiff0 format");
1288 }
1289 switch( op ){
1290 case 0x00:
1291 if( 0==nSrc ){
1292 /* https://fossil-scm.org/forum/forumpost/15d4b242bda2a108 */
1293 fossil_fatal("Don't know how to handle NULL input. "
1294 "Tip: do not use the --incremental flag "
1295 "in the svn dump command.");
1296 }
1297 if( offSrc>nSrc || off>nSrc-offSrc || lenCpy>nSrc-offSrc-off ){
1298 fossil_fatal("Invalid svndiff0 format");
1299 }
1300 zCpy = blob_buffer(pSrc)+offSrc+off;
1301 break;
1302 case 0x40:
1303 if( lenCpy>0 && off>=(u64)(zOut-blob_buffer(pOut)) ){
1304 fossil_fatal("Invalid svndiff0 format");
1305 }
1306 zCpy = blob_buffer(pOut)+off;
1307 break;
1308 case 0x80:
1309 if( lenCpy>(u64)(zDataEnd-zData) ){
1310 fossil_fatal("Invalid svndiff0 format");
1311 }
1312 zCpy = zData;
1313 zData += lenCpy;
1314 break;
1315 default: fossil_fatal("Invalid svndiff0 instruction");
1316 }
1317 lenLeft -= lenCpy;
 
 
 
 
 
 
 
 
1318 while( lenCpy-- > 0 ){
1319 *zOut++ = *zCpy++;
1320 }
1321 }
1322 if( lenLeft!=0 ){
1323 fossil_fatal("Invalid svndiff0 format");
1324 }
1325 zDiff = zDataEnd;
1326 }
1327 }
1328
1329 /*
1330 ** Extract the branch or tag that the given path is on. Return the branch ID.
1331
+3 -3
--- src/main.c
+++ src/main.c
@@ -2408,14 +2408,14 @@
24082408
**
24092409
** repolist When in "directory:" mode, display a page
24102410
** showing a list of available repositories if
24112411
** the URL is "/". Some control over the display
24122412
** is accomplished using environment variables.
2413
-** FOSSIL_REPOLIST_TITLE is the tital of the page.
2414
-** FOSSIL_REPOLIST_SHOW cause the "Description"
2413
+** FOSSIL_REPOLIST_TITLE is the title of the page.
2414
+** FOSSIL_REPOLIST_SHOW causes the "Description"
24152415
** column to display if it contains "description" as
2416
-** as a substring, and causes the Login-Group column
2416
+** a substring, and causes the Login-Group column
24172417
** to display if it contains the "login-group"
24182418
** substring.
24192419
**
24202420
** localauth Grant administrator privileges to connections
24212421
** from 127.0.0.1 or ::1.
24222422
--- src/main.c
+++ src/main.c
@@ -2408,14 +2408,14 @@
2408 **
2409 ** repolist When in "directory:" mode, display a page
2410 ** showing a list of available repositories if
2411 ** the URL is "/". Some control over the display
2412 ** is accomplished using environment variables.
2413 ** FOSSIL_REPOLIST_TITLE is the tital of the page.
2414 ** FOSSIL_REPOLIST_SHOW cause the "Description"
2415 ** column to display if it contains "description" as
2416 ** as a substring, and causes the Login-Group column
2417 ** to display if it contains the "login-group"
2418 ** substring.
2419 **
2420 ** localauth Grant administrator privileges to connections
2421 ** from 127.0.0.1 or ::1.
2422
--- src/main.c
+++ src/main.c
@@ -2408,14 +2408,14 @@
2408 **
2409 ** repolist When in "directory:" mode, display a page
2410 ** showing a list of available repositories if
2411 ** the URL is "/". Some control over the display
2412 ** is accomplished using environment variables.
2413 ** FOSSIL_REPOLIST_TITLE is the title of the page.
2414 ** FOSSIL_REPOLIST_SHOW causes the "Description"
2415 ** column to display if it contains "description" as
2416 ** a substring, and causes the Login-Group column
2417 ** to display if it contains the "login-group"
2418 ** substring.
2419 **
2420 ** localauth Grant administrator privileges to connections
2421 ** from 127.0.0.1 or ::1.
2422
+10
--- src/main.mk
+++ src/main.mk
@@ -210,10 +210,20 @@
210210
$(SRCDIR)/../skins/original/header.txt \
211211
$(SRCDIR)/../skins/plain_gray/css.txt \
212212
$(SRCDIR)/../skins/plain_gray/details.txt \
213213
$(SRCDIR)/../skins/plain_gray/footer.txt \
214214
$(SRCDIR)/../skins/plain_gray/header.txt \
215
+ $(SRCDIR)/../skins/refined-dark/css.txt \
216
+ $(SRCDIR)/../skins/refined-dark/details.txt \
217
+ $(SRCDIR)/../skins/refined-dark/footer.txt \
218
+ $(SRCDIR)/../skins/refined-dark/header.txt \
219
+ $(SRCDIR)/../skins/refined-dark/js.txt \
220
+ $(SRCDIR)/../skins/refined-light/css.txt \
221
+ $(SRCDIR)/../skins/refined-light/details.txt \
222
+ $(SRCDIR)/../skins/refined-light/footer.txt \
223
+ $(SRCDIR)/../skins/refined-light/header.txt \
224
+ $(SRCDIR)/../skins/refined-light/js.txt \
215225
$(SRCDIR)/../skins/xekri/css.txt \
216226
$(SRCDIR)/../skins/xekri/details.txt \
217227
$(SRCDIR)/../skins/xekri/footer.txt \
218228
$(SRCDIR)/../skins/xekri/header.txt \
219229
$(SRCDIR)/alerts/bflat2.wav \
220230
--- src/main.mk
+++ src/main.mk
@@ -210,10 +210,20 @@
210 $(SRCDIR)/../skins/original/header.txt \
211 $(SRCDIR)/../skins/plain_gray/css.txt \
212 $(SRCDIR)/../skins/plain_gray/details.txt \
213 $(SRCDIR)/../skins/plain_gray/footer.txt \
214 $(SRCDIR)/../skins/plain_gray/header.txt \
 
 
 
 
 
 
 
 
 
 
215 $(SRCDIR)/../skins/xekri/css.txt \
216 $(SRCDIR)/../skins/xekri/details.txt \
217 $(SRCDIR)/../skins/xekri/footer.txt \
218 $(SRCDIR)/../skins/xekri/header.txt \
219 $(SRCDIR)/alerts/bflat2.wav \
220
--- src/main.mk
+++ src/main.mk
@@ -210,10 +210,20 @@
210 $(SRCDIR)/../skins/original/header.txt \
211 $(SRCDIR)/../skins/plain_gray/css.txt \
212 $(SRCDIR)/../skins/plain_gray/details.txt \
213 $(SRCDIR)/../skins/plain_gray/footer.txt \
214 $(SRCDIR)/../skins/plain_gray/header.txt \
215 $(SRCDIR)/../skins/refined-dark/css.txt \
216 $(SRCDIR)/../skins/refined-dark/details.txt \
217 $(SRCDIR)/../skins/refined-dark/footer.txt \
218 $(SRCDIR)/../skins/refined-dark/header.txt \
219 $(SRCDIR)/../skins/refined-dark/js.txt \
220 $(SRCDIR)/../skins/refined-light/css.txt \
221 $(SRCDIR)/../skins/refined-light/details.txt \
222 $(SRCDIR)/../skins/refined-light/footer.txt \
223 $(SRCDIR)/../skins/refined-light/header.txt \
224 $(SRCDIR)/../skins/refined-light/js.txt \
225 $(SRCDIR)/../skins/xekri/css.txt \
226 $(SRCDIR)/../skins/xekri/details.txt \
227 $(SRCDIR)/../skins/xekri/footer.txt \
228 $(SRCDIR)/../skins/xekri/header.txt \
229 $(SRCDIR)/alerts/bflat2.wav \
230
+4 -5
--- src/manifest.c
+++ src/manifest.c
@@ -2661,11 +2661,11 @@
26612661
"Add attachment [/artifact/%!S|%h] to [/artifact/%!S|%h]",
26622662
p->zAttachSrc, p->zAttachName,
26632663
p->zAttachTarget, p->zAttachTarget);
26642664
}else{
26652665
zComment = mprintf("Delete attachment \"%h\" from "
2666
- "[/artifact/%!S|%h",
2666
+ "[/artifact/%!S|%h]",
26672667
p->zAttachName, p->zAttachTarget,
26682668
p->zAttachTarget);
26692669
}
26702670
break;
26712671
case CFTYPE_WIKI:
@@ -2687,14 +2687,13 @@
26872687
"Add attachment [/artifact/%!S|%h] to tech note "
26882688
"[/technote/%!S|%S]",
26892689
p->zAttachSrc, p->zAttachName, p->zAttachTarget, p->zAttachTarget);
26902690
}else{
26912691
zComment = mprintf(
2692
- "Delete attachment \"/artifact/%!S|%h\" from"
2692
+ "Delete attachment \"%h\" from"
26932693
" tech note [/technote/%!S|%S]",
2694
- p->zAttachName, p->zAttachName,
2695
- p->zAttachTarget,p->zAttachTarget);
2694
+ p->zAttachName, p->zAttachTarget, p->zAttachTarget);
26962695
}
26972696
break;
26982697
case CFTYPE_TICKET:
26992698
attachToType = 't';
27002699
if( isAdd ){
@@ -2867,11 +2866,11 @@
28672866
);
28682867
/*
28692868
** If this edit is the most recent, then make it the title for
28702869
** all other entries for the same thread
28712870
*/
2872
- if( !db_exists("SELECT 1 FROM forumpost WHERE froot=%d AND firt=0"
2871
+ if( !db_exists("SELECT 1 FROM forumpost WHERE froot=%d AND firt IS NULL"
28732872
" AND fpid!=%d AND fmtime>%.17g", froot, rid, p->rDate)
28742873
){
28752874
/* This entry establishes a new title for all entries on the thread */
28762875
db_multi_exec(
28772876
"UPDATE event"
28782877
--- src/manifest.c
+++ src/manifest.c
@@ -2661,11 +2661,11 @@
2661 "Add attachment [/artifact/%!S|%h] to [/artifact/%!S|%h]",
2662 p->zAttachSrc, p->zAttachName,
2663 p->zAttachTarget, p->zAttachTarget);
2664 }else{
2665 zComment = mprintf("Delete attachment \"%h\" from "
2666 "[/artifact/%!S|%h",
2667 p->zAttachName, p->zAttachTarget,
2668 p->zAttachTarget);
2669 }
2670 break;
2671 case CFTYPE_WIKI:
@@ -2687,14 +2687,13 @@
2687 "Add attachment [/artifact/%!S|%h] to tech note "
2688 "[/technote/%!S|%S]",
2689 p->zAttachSrc, p->zAttachName, p->zAttachTarget, p->zAttachTarget);
2690 }else{
2691 zComment = mprintf(
2692 "Delete attachment \"/artifact/%!S|%h\" from"
2693 " tech note [/technote/%!S|%S]",
2694 p->zAttachName, p->zAttachName,
2695 p->zAttachTarget,p->zAttachTarget);
2696 }
2697 break;
2698 case CFTYPE_TICKET:
2699 attachToType = 't';
2700 if( isAdd ){
@@ -2867,11 +2866,11 @@
2867 );
2868 /*
2869 ** If this edit is the most recent, then make it the title for
2870 ** all other entries for the same thread
2871 */
2872 if( !db_exists("SELECT 1 FROM forumpost WHERE froot=%d AND firt=0"
2873 " AND fpid!=%d AND fmtime>%.17g", froot, rid, p->rDate)
2874 ){
2875 /* This entry establishes a new title for all entries on the thread */
2876 db_multi_exec(
2877 "UPDATE event"
2878
--- src/manifest.c
+++ src/manifest.c
@@ -2661,11 +2661,11 @@
2661 "Add attachment [/artifact/%!S|%h] to [/artifact/%!S|%h]",
2662 p->zAttachSrc, p->zAttachName,
2663 p->zAttachTarget, p->zAttachTarget);
2664 }else{
2665 zComment = mprintf("Delete attachment \"%h\" from "
2666 "[/artifact/%!S|%h]",
2667 p->zAttachName, p->zAttachTarget,
2668 p->zAttachTarget);
2669 }
2670 break;
2671 case CFTYPE_WIKI:
@@ -2687,14 +2687,13 @@
2687 "Add attachment [/artifact/%!S|%h] to tech note "
2688 "[/technote/%!S|%S]",
2689 p->zAttachSrc, p->zAttachName, p->zAttachTarget, p->zAttachTarget);
2690 }else{
2691 zComment = mprintf(
2692 "Delete attachment \"%h\" from"
2693 " tech note [/technote/%!S|%S]",
2694 p->zAttachName, p->zAttachTarget, p->zAttachTarget);
 
2695 }
2696 break;
2697 case CFTYPE_TICKET:
2698 attachToType = 't';
2699 if( isAdd ){
@@ -2867,11 +2866,11 @@
2866 );
2867 /*
2868 ** If this edit is the most recent, then make it the title for
2869 ** all other entries for the same thread
2870 */
2871 if( !db_exists("SELECT 1 FROM forumpost WHERE froot=%d AND firt IS NULL"
2872 " AND fpid!=%d AND fmtime>%.17g", froot, rid, p->rDate)
2873 ){
2874 /* This entry establishes a new title for all entries on the thread */
2875 db_multi_exec(
2876 "UPDATE event"
2877
+1 -1
--- src/name.c
+++ src/name.c
@@ -2213,11 +2213,11 @@
22132213
/*
22142214
** WEBPAGE: phantoms
22152215
**
22162216
** Show a list of all "phantom" artifacts that are not marked as "private".
22172217
**
2218
-** A "phantom" artifact is an artifact whose hash named appears in some
2218
+** A "phantom" artifact is an artifact whose hash name appears in some
22192219
** artifact but whose content is unknown. For example, if a manifest
22202220
** references a particular SHA3 hash of a file, but that SHA3 hash is
22212221
** not on the shunning list and is not in the database, then the file
22222222
** is a phantom. We know it exists, but we do not know its content.
22232223
**
22242224
--- src/name.c
+++ src/name.c
@@ -2213,11 +2213,11 @@
2213 /*
2214 ** WEBPAGE: phantoms
2215 **
2216 ** Show a list of all "phantom" artifacts that are not marked as "private".
2217 **
2218 ** A "phantom" artifact is an artifact whose hash named appears in some
2219 ** artifact but whose content is unknown. For example, if a manifest
2220 ** references a particular SHA3 hash of a file, but that SHA3 hash is
2221 ** not on the shunning list and is not in the database, then the file
2222 ** is a phantom. We know it exists, but we do not know its content.
2223 **
2224
--- src/name.c
+++ src/name.c
@@ -2213,11 +2213,11 @@
2213 /*
2214 ** WEBPAGE: phantoms
2215 **
2216 ** Show a list of all "phantom" artifacts that are not marked as "private".
2217 **
2218 ** A "phantom" artifact is an artifact whose hash name appears in some
2219 ** artifact but whose content is unknown. For example, if a manifest
2220 ** references a particular SHA3 hash of a file, but that SHA3 hash is
2221 ** not on the shunning list and is not in the database, then the file
2222 ** is a phantom. We know it exists, but we do not know its content.
2223 **
2224
+98 -5
--- src/purge.c
+++ src/purge.c
@@ -401,19 +401,19 @@
401401
fossil_fatal("delta loop while uncompressing purged artifacts");
402402
}
403403
bag_insert(&busy, iSrc);
404404
}
405405
db_prepare(&q,
406
- "SELECT uuid, data, isPrivate, ix.piid"
406
+ "SELECT uuid, data, isPrivate, ix.piid, orid"
407407
" FROM ix, purgeitem"
408408
" WHERE ix.srcid=%d"
409409
" AND ix.piid=purgeitem.piid;",
410410
iSrc
411411
);
412412
while( db_step(&q)==SQLITE_ROW ){
413413
Blob h1, c1, c2;
414
- int isPriv, rid;
414
+ int isPriv, rid, orid;
415415
blob_zero(&h1);
416416
db_column_blob(&q, 0, &h1);
417417
blob_zero(&c1);
418418
db_column_blob(&q, 1, &c1);
419419
blob_uncompress(&c1, &c1);
@@ -426,10 +426,26 @@
426426
}
427427
if( hname_verify_hash(&c2, blob_buffer(&h1), blob_size(&h1))==0 ){
428428
fossil_fatal("incorrect hash on %b", &h1);
429429
}
430430
isPriv = db_column_int(&q, 2);
431
+ orid = db_column_int(&q, 4);
432
+ if( orid>0
433
+ && !db_exists("SELECT 1 FROM blob WHERE rid=%d OR uuid=%Q",
434
+ orid, blob_str(&h1))
435
+ ){
436
+ /* Restore it under its old record number, which links still name */
437
+ db_multi_exec(
438
+ "INSERT INTO blob(rid,rcvid,size,uuid,content)"
439
+ " VALUES(%d,0,-1,%Q,NULL);"
440
+ "INSERT INTO phantom VALUES(%d);",
441
+ orid, blob_str(&h1), orid
442
+ );
443
+ if( !isPriv ){
444
+ db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d)", orid);
445
+ }
446
+ }
431447
rid = content_put_ex(&c2, blob_str(&h1), 0, 0, isPriv);
432448
if( rid==0 ){
433449
fossil_fatal("%s", g.zErrMsg);
434450
}else{
435451
if( !isPriv ) content_make_public(rid);
@@ -440,10 +456,47 @@
440456
blob_reset(&c2);
441457
}
442458
db_finalize(&q);
443459
if( iSrc>0 ) bag_remove(&busy, iSrc);
444460
}
461
+
462
+/*
463
+** Remove from the graveyard every artifact that was private when it was
464
+** purged, and any purge event left empty, so that "fossil scrub" leaves
465
+** no private content behind. An item that stays, but is stored as a
466
+** delta from one that goes, is stored whole first.
467
+*/
468
+void purge_drop_private_items(void){
469
+ Stmt q;
470
+ if( !db_table_exists("repository","purgeitem") ) return;
471
+ db_multi_exec(
472
+ "CREATE TEMP TABLE pwhole AS"
473
+ " SELECT piid FROM purgeitem WHERE NOT isPrivate"
474
+ " AND srcid IN (SELECT piid FROM purgeitem WHERE isPrivate)"
475
+ );
476
+ db_prepare(&q, "SELECT piid FROM pwhole");
477
+ while( db_step(&q)==SQLITE_ROW ){
478
+ int piid = db_column_int(&q, 0);
479
+ Blob content, cmpr;
480
+ Stmt u;
481
+ purge_extract_item(piid, &content);
482
+ blob_compress(&content, &cmpr);
483
+ db_prepare(&u, "UPDATE purgeitem SET srcid=NULL, data=:data"
484
+ " WHERE piid=%d", piid);
485
+ db_bind_blob(&u, ":data", &cmpr);
486
+ db_exec(&u);
487
+ db_finalize(&u);
488
+ blob_reset(&content);
489
+ blob_reset(&cmpr);
490
+ }
491
+ db_finalize(&q);
492
+ db_multi_exec(
493
+ "DROP TABLE pwhole;"
494
+ "DELETE FROM purgeitem WHERE isPrivate;"
495
+ "DELETE FROM purgeevent WHERE peid NOT IN (SELECT peid FROM purgeitem);"
496
+ );
497
+}
445498
446499
/*
447500
** COMMAND: purge*
448501
**
449502
** The purge command removes content from a repository and stores that content
@@ -540,11 +593,11 @@
540593
Blob content;
541594
if( g.argc<4 ) usage("cat HASH...");
542595
for(i=3; i<g.argc; i++){
543596
piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'",
544597
g.argv[i]);
545
- if( piid==0 ) fossil_fatal("no such item: %s", g.argv[3]);
598
+ if( piid==0 ) fossil_fatal("no such item: %s", g.argv[i]);
546599
purge_extract_item(piid, &content);
547600
blob_write_to_file(&content, "-");
548601
blob_reset(&content);
549602
}
550603
}else if( strncmp(zSubcmd, "checkins", n)==0 ){
@@ -551,18 +604,26 @@
551604
int vid;
552605
if( find_option("explain",0,0)!=0 || find_option("dry-run",0,0)!=0 ){
553606
purgeFlags |= PURGE_EXPLAIN_ONLY;
554607
}
555608
verify_all_options();
609
+ vid = 0;
610
+ if( g.localOpen ){
611
+ vid = db_lget_int("checkout",0);
612
+ }else if( db_open_local(0)
613
+ && db_exists("SELECT 1 WHERE inode(%Q)=inode(%Q)",
614
+ g.zRepositoryName, db_repository_filename())
615
+ ){
616
+ vid = db_lget_int("checkout",0);
617
+ }
556618
db_begin_transaction();
557619
if( g.argc<=3 ) usage("checkins TAGS... [OPTIONS]");
558620
db_multi_exec("CREATE TEMP TABLE ok(rid INTEGER PRIMARY KEY)");
559621
for(i=3; i<g.argc; i++){
560622
int r = name_to_typed_rid(g.argv[i], "br");
561623
compute_descendants(r, 1000000000);
562624
}
563
- vid = db_lget_int("checkout",0);
564625
if( db_exists("SELECT 1 FROM ok WHERE rid=%d",vid) ){
565626
fossil_fatal("cannot purge the current check-out");
566627
}
567628
find_checkin_associates("ok", 1);
568629
purge_artifact_list("ok", "", purgeFlags);
@@ -610,11 +671,12 @@
610671
}
611672
}
612673
db_begin_transaction();
613674
for(i=3; i<g.argc; i++){
614675
int peid = atoi(g.argv[i]);
615
- if( !db_exists("SELECT 1 FROM purgeevent WHERE peid=%d",peid) ){
676
+ if( !db_table_exists("repository","purgeevent")
677
+ || !db_exists("SELECT 1 FROM purgeevent WHERE peid=%d",peid) ){
616678
fossil_fatal("no such purge event: %s", g.argv[i]);
617679
}
618680
db_multi_exec(
619681
"DELETE FROM purgeevent WHERE peid=%d;"
620682
"DELETE FROM purgeitem WHERE peid=%d;",
@@ -626,10 +688,14 @@
626688
fossil_fatal("not yet implemented....");
627689
}else if( strncmp(zSubcmd, "undo", n)==0 ){
628690
int peid;
629691
if( g.argc!=4 ) usage("undo ID");
630692
peid = atoi(g.argv[3]);
693
+ if( !db_table_exists("repository","purgeevent")
694
+ || !db_exists("SELECT 1 FROM purgeevent WHERE peid=%d",peid) ){
695
+ fossil_fatal("no such purge event: %s", g.argv[3]);
696
+ }
631697
if( (purgeFlags & PURGE_EXPLAIN_ONLY)==0 ){
632698
db_begin_transaction();
633699
db_multi_exec(
634700
"CREATE TEMP TABLE ix("
635701
" piid INTEGER PRIMARY KEY,"
@@ -645,10 +711,37 @@
645711
" WHERE uuid IN (SELECT uuid FROM purgeitem WHERE peid=%d);",
646712
peid
647713
);
648714
manifest_crosslink_begin();
649715
purge_item_resurrect(0, 0);
716
+ /* Relink check-ins whose purged parent is now restored */
717
+ db_multi_exec(
718
+ "CREATE TEMP TABLE prelink AS"
719
+ " SELECT DISTINCT mid FROM mlink"
720
+ " WHERE pmid IN (SELECT blob.rid FROM blob, purgeitem"
721
+ " WHERE purgeitem.peid=%d"
722
+ " AND blob.uuid=purgeitem.uuid"
723
+ " AND blob.rid=purgeitem.orid)"
724
+ " AND NOT EXISTS(SELECT 1 FROM plink"
725
+ " WHERE cid=mlink.mid AND pid=mlink.pmid)",
726
+ peid
727
+ );
728
+ db_prepare(&q, "SELECT mid FROM prelink");
729
+ while( db_step(&q)==SQLITE_ROW ){
730
+ int mid = db_column_int(&q, 0);
731
+ Blob c;
732
+ if( content_get(mid, &c) ){
733
+ db_multi_exec(
734
+ "DELETE FROM plink WHERE cid=%d;"
735
+ "DELETE FROM mlink WHERE mid=%d;",
736
+ mid, mid
737
+ );
738
+ manifest_crosslink(mid, &c, MC_NO_ERRORS);
739
+ }
740
+ }
741
+ db_finalize(&q);
742
+ db_multi_exec("DROP TABLE prelink");
650743
manifest_crosslink_end(0);
651744
db_multi_exec("DELETE FROM purgeevent WHERE peid=%d", peid);
652745
db_multi_exec("DELETE FROM purgeitem WHERE peid=%d", peid);
653746
db_end_transaction(0);
654747
}
655748
--- src/purge.c
+++ src/purge.c
@@ -401,19 +401,19 @@
401 fossil_fatal("delta loop while uncompressing purged artifacts");
402 }
403 bag_insert(&busy, iSrc);
404 }
405 db_prepare(&q,
406 "SELECT uuid, data, isPrivate, ix.piid"
407 " FROM ix, purgeitem"
408 " WHERE ix.srcid=%d"
409 " AND ix.piid=purgeitem.piid;",
410 iSrc
411 );
412 while( db_step(&q)==SQLITE_ROW ){
413 Blob h1, c1, c2;
414 int isPriv, rid;
415 blob_zero(&h1);
416 db_column_blob(&q, 0, &h1);
417 blob_zero(&c1);
418 db_column_blob(&q, 1, &c1);
419 blob_uncompress(&c1, &c1);
@@ -426,10 +426,26 @@
426 }
427 if( hname_verify_hash(&c2, blob_buffer(&h1), blob_size(&h1))==0 ){
428 fossil_fatal("incorrect hash on %b", &h1);
429 }
430 isPriv = db_column_int(&q, 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431 rid = content_put_ex(&c2, blob_str(&h1), 0, 0, isPriv);
432 if( rid==0 ){
433 fossil_fatal("%s", g.zErrMsg);
434 }else{
435 if( !isPriv ) content_make_public(rid);
@@ -440,10 +456,47 @@
440 blob_reset(&c2);
441 }
442 db_finalize(&q);
443 if( iSrc>0 ) bag_remove(&busy, iSrc);
444 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
445
446 /*
447 ** COMMAND: purge*
448 **
449 ** The purge command removes content from a repository and stores that content
@@ -540,11 +593,11 @@
540 Blob content;
541 if( g.argc<4 ) usage("cat HASH...");
542 for(i=3; i<g.argc; i++){
543 piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'",
544 g.argv[i]);
545 if( piid==0 ) fossil_fatal("no such item: %s", g.argv[3]);
546 purge_extract_item(piid, &content);
547 blob_write_to_file(&content, "-");
548 blob_reset(&content);
549 }
550 }else if( strncmp(zSubcmd, "checkins", n)==0 ){
@@ -551,18 +604,26 @@
551 int vid;
552 if( find_option("explain",0,0)!=0 || find_option("dry-run",0,0)!=0 ){
553 purgeFlags |= PURGE_EXPLAIN_ONLY;
554 }
555 verify_all_options();
 
 
 
 
 
 
 
 
 
556 db_begin_transaction();
557 if( g.argc<=3 ) usage("checkins TAGS... [OPTIONS]");
558 db_multi_exec("CREATE TEMP TABLE ok(rid INTEGER PRIMARY KEY)");
559 for(i=3; i<g.argc; i++){
560 int r = name_to_typed_rid(g.argv[i], "br");
561 compute_descendants(r, 1000000000);
562 }
563 vid = db_lget_int("checkout",0);
564 if( db_exists("SELECT 1 FROM ok WHERE rid=%d",vid) ){
565 fossil_fatal("cannot purge the current check-out");
566 }
567 find_checkin_associates("ok", 1);
568 purge_artifact_list("ok", "", purgeFlags);
@@ -610,11 +671,12 @@
610 }
611 }
612 db_begin_transaction();
613 for(i=3; i<g.argc; i++){
614 int peid = atoi(g.argv[i]);
615 if( !db_exists("SELECT 1 FROM purgeevent WHERE peid=%d",peid) ){
 
616 fossil_fatal("no such purge event: %s", g.argv[i]);
617 }
618 db_multi_exec(
619 "DELETE FROM purgeevent WHERE peid=%d;"
620 "DELETE FROM purgeitem WHERE peid=%d;",
@@ -626,10 +688,14 @@
626 fossil_fatal("not yet implemented....");
627 }else if( strncmp(zSubcmd, "undo", n)==0 ){
628 int peid;
629 if( g.argc!=4 ) usage("undo ID");
630 peid = atoi(g.argv[3]);
 
 
 
 
631 if( (purgeFlags & PURGE_EXPLAIN_ONLY)==0 ){
632 db_begin_transaction();
633 db_multi_exec(
634 "CREATE TEMP TABLE ix("
635 " piid INTEGER PRIMARY KEY,"
@@ -645,10 +711,37 @@
645 " WHERE uuid IN (SELECT uuid FROM purgeitem WHERE peid=%d);",
646 peid
647 );
648 manifest_crosslink_begin();
649 purge_item_resurrect(0, 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650 manifest_crosslink_end(0);
651 db_multi_exec("DELETE FROM purgeevent WHERE peid=%d", peid);
652 db_multi_exec("DELETE FROM purgeitem WHERE peid=%d", peid);
653 db_end_transaction(0);
654 }
655
--- src/purge.c
+++ src/purge.c
@@ -401,19 +401,19 @@
401 fossil_fatal("delta loop while uncompressing purged artifacts");
402 }
403 bag_insert(&busy, iSrc);
404 }
405 db_prepare(&q,
406 "SELECT uuid, data, isPrivate, ix.piid, orid"
407 " FROM ix, purgeitem"
408 " WHERE ix.srcid=%d"
409 " AND ix.piid=purgeitem.piid;",
410 iSrc
411 );
412 while( db_step(&q)==SQLITE_ROW ){
413 Blob h1, c1, c2;
414 int isPriv, rid, orid;
415 blob_zero(&h1);
416 db_column_blob(&q, 0, &h1);
417 blob_zero(&c1);
418 db_column_blob(&q, 1, &c1);
419 blob_uncompress(&c1, &c1);
@@ -426,10 +426,26 @@
426 }
427 if( hname_verify_hash(&c2, blob_buffer(&h1), blob_size(&h1))==0 ){
428 fossil_fatal("incorrect hash on %b", &h1);
429 }
430 isPriv = db_column_int(&q, 2);
431 orid = db_column_int(&q, 4);
432 if( orid>0
433 && !db_exists("SELECT 1 FROM blob WHERE rid=%d OR uuid=%Q",
434 orid, blob_str(&h1))
435 ){
436 /* Restore it under its old record number, which links still name */
437 db_multi_exec(
438 "INSERT INTO blob(rid,rcvid,size,uuid,content)"
439 " VALUES(%d,0,-1,%Q,NULL);"
440 "INSERT INTO phantom VALUES(%d);",
441 orid, blob_str(&h1), orid
442 );
443 if( !isPriv ){
444 db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d)", orid);
445 }
446 }
447 rid = content_put_ex(&c2, blob_str(&h1), 0, 0, isPriv);
448 if( rid==0 ){
449 fossil_fatal("%s", g.zErrMsg);
450 }else{
451 if( !isPriv ) content_make_public(rid);
@@ -440,10 +456,47 @@
456 blob_reset(&c2);
457 }
458 db_finalize(&q);
459 if( iSrc>0 ) bag_remove(&busy, iSrc);
460 }
461
462 /*
463 ** Remove from the graveyard every artifact that was private when it was
464 ** purged, and any purge event left empty, so that "fossil scrub" leaves
465 ** no private content behind. An item that stays, but is stored as a
466 ** delta from one that goes, is stored whole first.
467 */
468 void purge_drop_private_items(void){
469 Stmt q;
470 if( !db_table_exists("repository","purgeitem") ) return;
471 db_multi_exec(
472 "CREATE TEMP TABLE pwhole AS"
473 " SELECT piid FROM purgeitem WHERE NOT isPrivate"
474 " AND srcid IN (SELECT piid FROM purgeitem WHERE isPrivate)"
475 );
476 db_prepare(&q, "SELECT piid FROM pwhole");
477 while( db_step(&q)==SQLITE_ROW ){
478 int piid = db_column_int(&q, 0);
479 Blob content, cmpr;
480 Stmt u;
481 purge_extract_item(piid, &content);
482 blob_compress(&content, &cmpr);
483 db_prepare(&u, "UPDATE purgeitem SET srcid=NULL, data=:data"
484 " WHERE piid=%d", piid);
485 db_bind_blob(&u, ":data", &cmpr);
486 db_exec(&u);
487 db_finalize(&u);
488 blob_reset(&content);
489 blob_reset(&cmpr);
490 }
491 db_finalize(&q);
492 db_multi_exec(
493 "DROP TABLE pwhole;"
494 "DELETE FROM purgeitem WHERE isPrivate;"
495 "DELETE FROM purgeevent WHERE peid NOT IN (SELECT peid FROM purgeitem);"
496 );
497 }
498
499 /*
500 ** COMMAND: purge*
501 **
502 ** The purge command removes content from a repository and stores that content
@@ -540,11 +593,11 @@
593 Blob content;
594 if( g.argc<4 ) usage("cat HASH...");
595 for(i=3; i<g.argc; i++){
596 piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'",
597 g.argv[i]);
598 if( piid==0 ) fossil_fatal("no such item: %s", g.argv[i]);
599 purge_extract_item(piid, &content);
600 blob_write_to_file(&content, "-");
601 blob_reset(&content);
602 }
603 }else if( strncmp(zSubcmd, "checkins", n)==0 ){
@@ -551,18 +604,26 @@
604 int vid;
605 if( find_option("explain",0,0)!=0 || find_option("dry-run",0,0)!=0 ){
606 purgeFlags |= PURGE_EXPLAIN_ONLY;
607 }
608 verify_all_options();
609 vid = 0;
610 if( g.localOpen ){
611 vid = db_lget_int("checkout",0);
612 }else if( db_open_local(0)
613 && db_exists("SELECT 1 WHERE inode(%Q)=inode(%Q)",
614 g.zRepositoryName, db_repository_filename())
615 ){
616 vid = db_lget_int("checkout",0);
617 }
618 db_begin_transaction();
619 if( g.argc<=3 ) usage("checkins TAGS... [OPTIONS]");
620 db_multi_exec("CREATE TEMP TABLE ok(rid INTEGER PRIMARY KEY)");
621 for(i=3; i<g.argc; i++){
622 int r = name_to_typed_rid(g.argv[i], "br");
623 compute_descendants(r, 1000000000);
624 }
 
625 if( db_exists("SELECT 1 FROM ok WHERE rid=%d",vid) ){
626 fossil_fatal("cannot purge the current check-out");
627 }
628 find_checkin_associates("ok", 1);
629 purge_artifact_list("ok", "", purgeFlags);
@@ -610,11 +671,12 @@
671 }
672 }
673 db_begin_transaction();
674 for(i=3; i<g.argc; i++){
675 int peid = atoi(g.argv[i]);
676 if( !db_table_exists("repository","purgeevent")
677 || !db_exists("SELECT 1 FROM purgeevent WHERE peid=%d",peid) ){
678 fossil_fatal("no such purge event: %s", g.argv[i]);
679 }
680 db_multi_exec(
681 "DELETE FROM purgeevent WHERE peid=%d;"
682 "DELETE FROM purgeitem WHERE peid=%d;",
@@ -626,10 +688,14 @@
688 fossil_fatal("not yet implemented....");
689 }else if( strncmp(zSubcmd, "undo", n)==0 ){
690 int peid;
691 if( g.argc!=4 ) usage("undo ID");
692 peid = atoi(g.argv[3]);
693 if( !db_table_exists("repository","purgeevent")
694 || !db_exists("SELECT 1 FROM purgeevent WHERE peid=%d",peid) ){
695 fossil_fatal("no such purge event: %s", g.argv[3]);
696 }
697 if( (purgeFlags & PURGE_EXPLAIN_ONLY)==0 ){
698 db_begin_transaction();
699 db_multi_exec(
700 "CREATE TEMP TABLE ix("
701 " piid INTEGER PRIMARY KEY,"
@@ -645,10 +711,37 @@
711 " WHERE uuid IN (SELECT uuid FROM purgeitem WHERE peid=%d);",
712 peid
713 );
714 manifest_crosslink_begin();
715 purge_item_resurrect(0, 0);
716 /* Relink check-ins whose purged parent is now restored */
717 db_multi_exec(
718 "CREATE TEMP TABLE prelink AS"
719 " SELECT DISTINCT mid FROM mlink"
720 " WHERE pmid IN (SELECT blob.rid FROM blob, purgeitem"
721 " WHERE purgeitem.peid=%d"
722 " AND blob.uuid=purgeitem.uuid"
723 " AND blob.rid=purgeitem.orid)"
724 " AND NOT EXISTS(SELECT 1 FROM plink"
725 " WHERE cid=mlink.mid AND pid=mlink.pmid)",
726 peid
727 );
728 db_prepare(&q, "SELECT mid FROM prelink");
729 while( db_step(&q)==SQLITE_ROW ){
730 int mid = db_column_int(&q, 0);
731 Blob c;
732 if( content_get(mid, &c) ){
733 db_multi_exec(
734 "DELETE FROM plink WHERE cid=%d;"
735 "DELETE FROM mlink WHERE mid=%d;",
736 mid, mid
737 );
738 manifest_crosslink(mid, &c, MC_NO_ERRORS);
739 }
740 }
741 db_finalize(&q);
742 db_multi_exec("DROP TABLE prelink");
743 manifest_crosslink_end(0);
744 db_multi_exec("DELETE FROM purgeevent WHERE peid=%d", peid);
745 db_multi_exec("DELETE FROM purgeitem WHERE peid=%d", peid);
746 db_end_transaction(0);
747 }
748
--- src/rebuild.c
+++ src/rebuild.c
@@ -1058,10 +1058,11 @@
10581058
}
10591059
db_begin_transaction();
10601060
if( privateOnly || bVerily ){
10611061
bNeedRebuild = db_exists("SELECT 1 FROM private");
10621062
delete_private_content();
1063
+ purge_drop_private_items();
10631064
}
10641065
if( !privateOnly ){
10651066
db_unprotect(PROTECT_ALL);
10661067
db_multi_exec(
10671068
"PRAGMA secure_delete=ON;"
10681069
--- src/rebuild.c
+++ src/rebuild.c
@@ -1058,10 +1058,11 @@
1058 }
1059 db_begin_transaction();
1060 if( privateOnly || bVerily ){
1061 bNeedRebuild = db_exists("SELECT 1 FROM private");
1062 delete_private_content();
 
1063 }
1064 if( !privateOnly ){
1065 db_unprotect(PROTECT_ALL);
1066 db_multi_exec(
1067 "PRAGMA secure_delete=ON;"
1068
--- src/rebuild.c
+++ src/rebuild.c
@@ -1058,10 +1058,11 @@
1058 }
1059 db_begin_transaction();
1060 if( privateOnly || bVerily ){
1061 bNeedRebuild = db_exists("SELECT 1 FROM private");
1062 delete_private_content();
1063 purge_drop_private_items();
1064 }
1065 if( !privateOnly ){
1066 db_unprotect(PROTECT_ALL);
1067 db_multi_exec(
1068 "PRAGMA secure_delete=ON;"
1069
--- src/skins.c
+++ src/skins.c
@@ -56,10 +56,12 @@
5656
{ "Eagle", "eagle", 0 },
5757
{ "Étienne", "etienne", 0 },
5858
{ "Khaki", "khaki", 0 },
5959
{ "Original", "original", 0 },
6060
{ "Plain Gray", "plain_gray", 0 },
61
+ { "Refined Dark", "refined-dark", 0 },
62
+ { "Refined Light", "refined-light", 0 },
6163
{ "Xekri", "xekri", 0 },
6264
};
6365
6466
/*
6567
** A skin consists of five "files" named here:
6668
--- src/skins.c
+++ src/skins.c
@@ -56,10 +56,12 @@
56 { "Eagle", "eagle", 0 },
57 { "Étienne", "etienne", 0 },
58 { "Khaki", "khaki", 0 },
59 { "Original", "original", 0 },
60 { "Plain Gray", "plain_gray", 0 },
 
 
61 { "Xekri", "xekri", 0 },
62 };
63
64 /*
65 ** A skin consists of five "files" named here:
66
--- src/skins.c
+++ src/skins.c
@@ -56,10 +56,12 @@
56 { "Eagle", "eagle", 0 },
57 { "Étienne", "etienne", 0 },
58 { "Khaki", "khaki", 0 },
59 { "Original", "original", 0 },
60 { "Plain Gray", "plain_gray", 0 },
61 { "Refined Dark", "refined-dark", 0 },
62 { "Refined Light", "refined-light", 0 },
63 { "Xekri", "xekri", 0 },
64 };
65
66 /*
67 ** A skin consists of five "files" named here:
68
--- src/stash.c
+++ src/stash.c
@@ -232,10 +232,16 @@
232232
blob_reset(&orig);
233233
blob_reset(&disk);
234234
db_bind_blob(&ins, ":content", &content);
235235
}
236236
db_bind_int(&ins, ":islink", file_islink(zPath));
237
+#if !defined(_WIN32)
238
+ /* vfile.isexe is the baseline's bit, so a stash would lose an
239
+ ** exec-bit change. Take the file's own, as create_manifest() does.
240
+ ** On Windows, file_isexe() is always false, so keep vfile's. */
241
+ if( !deleted ) db_bind_int(&ins, ":isexe", file_isexe(zPath, RepoFILE));
242
+#endif
237243
db_step(&ins);
238244
db_reset(&ins);
239245
fossil_free(zPath);
240246
blob_reset(&content);
241247
}
242248
--- src/stash.c
+++ src/stash.c
@@ -232,10 +232,16 @@
232 blob_reset(&orig);
233 blob_reset(&disk);
234 db_bind_blob(&ins, ":content", &content);
235 }
236 db_bind_int(&ins, ":islink", file_islink(zPath));
 
 
 
 
 
 
237 db_step(&ins);
238 db_reset(&ins);
239 fossil_free(zPath);
240 blob_reset(&content);
241 }
242
--- src/stash.c
+++ src/stash.c
@@ -232,10 +232,16 @@
232 blob_reset(&orig);
233 blob_reset(&disk);
234 db_bind_blob(&ins, ":content", &content);
235 }
236 db_bind_int(&ins, ":islink", file_islink(zPath));
237 #if !defined(_WIN32)
238 /* vfile.isexe is the baseline's bit, so a stash would lose an
239 ** exec-bit change. Take the file's own, as create_manifest() does.
240 ** On Windows, file_isexe() is always false, so keep vfile's. */
241 if( !deleted ) db_bind_int(&ins, ":isexe", file_isexe(zPath, RepoFILE));
242 #endif
243 db_step(&ins);
244 db_reset(&ins);
245 fossil_free(zPath);
246 blob_reset(&content);
247 }
248
+2 -2
--- src/tag.c
+++ src/tag.c
@@ -435,11 +435,11 @@
435435
** with a P-card, it gets translated to the
436436
** oldest parent of that artifact and
437437
** --propagate is assumed. This is
438438
** most useful with forum posts, wiki
439439
** pages, and tech notes, where tags are
440
-** most easliy managed via their initial
440
+** most easily managed via their initial
441441
** version.
442442
**
443443
** The --date-override and --user-override options support
444444
** importing history from other SCM systems. DATETIME has
445445
** the form 'YYYY-MM-DD HH:MM:SS'.
@@ -490,11 +490,11 @@
490490
** scripting compatibility, the internal tag types "wiki-",
491491
** "tkt-", and "event-" (technote) are elided by default
492492
** unless the --raw or --prefix options are used.
493493
**
494494
** Options:
495
-** -v|--inverse Inverse the meaning of --tagtype TYPE
495
+** -v|--inverse Invert the meaning of --tagtype TYPE
496496
** --prefix List only tags with the given prefix
497497
** Fossil-internal prefixes include "sym-"
498498
** (branch name), "wiki-", "event-"
499499
** (technote), and "tkt-" (ticket). The
500500
** prefix is stripped from the resulting
501501
--- src/tag.c
+++ src/tag.c
@@ -435,11 +435,11 @@
435 ** with a P-card, it gets translated to the
436 ** oldest parent of that artifact and
437 ** --propagate is assumed. This is
438 ** most useful with forum posts, wiki
439 ** pages, and tech notes, where tags are
440 ** most easliy managed via their initial
441 ** version.
442 **
443 ** The --date-override and --user-override options support
444 ** importing history from other SCM systems. DATETIME has
445 ** the form 'YYYY-MM-DD HH:MM:SS'.
@@ -490,11 +490,11 @@
490 ** scripting compatibility, the internal tag types "wiki-",
491 ** "tkt-", and "event-" (technote) are elided by default
492 ** unless the --raw or --prefix options are used.
493 **
494 ** Options:
495 ** -v|--inverse Inverse the meaning of --tagtype TYPE
496 ** --prefix List only tags with the given prefix
497 ** Fossil-internal prefixes include "sym-"
498 ** (branch name), "wiki-", "event-"
499 ** (technote), and "tkt-" (ticket). The
500 ** prefix is stripped from the resulting
501
--- src/tag.c
+++ src/tag.c
@@ -435,11 +435,11 @@
435 ** with a P-card, it gets translated to the
436 ** oldest parent of that artifact and
437 ** --propagate is assumed. This is
438 ** most useful with forum posts, wiki
439 ** pages, and tech notes, where tags are
440 ** most easily managed via their initial
441 ** version.
442 **
443 ** The --date-override and --user-override options support
444 ** importing history from other SCM systems. DATETIME has
445 ** the form 'YYYY-MM-DD HH:MM:SS'.
@@ -490,11 +490,11 @@
490 ** scripting compatibility, the internal tag types "wiki-",
491 ** "tkt-", and "event-" (technote) are elided by default
492 ** unless the --raw or --prefix options are used.
493 **
494 ** Options:
495 ** -v|--inverse Invert the meaning of --tagtype TYPE
496 ** --prefix List only tags with the given prefix
497 ** Fossil-internal prefixes include "sym-"
498 ** (branch name), "wiki-", "event-"
499 ** (technote), and "tkt-" (ticket). The
500 ** prefix is stripped from the resulting
501
+3 -3
--- src/tar.c
+++ src/tar.c
@@ -915,21 +915,21 @@
915915
**
916916
** r=TAG TAG identifies the check-in that is turned into a
917917
** compressed tarball. The default value is the name of
918918
** the main branch (usually "trunk").
919919
** If r= is omitted and if the name= query parameter
920
-** contains one "/" character then the of part the
920
+** contains one "/" character then the part of the
921921
** name= value before the / becomes the TAG and the
922922
** part of the name= value after the / is the download
923923
** filename. If no check-in is specified by either
924924
** name= or r=, then the name of the main branch
925925
** (usually "trunk") is used.
926926
**
927927
** in=PATTERN Only include files that match the comma-separated
928928
** list of GLOB patterns in PATTERN, as with ex=
929929
**
930
-** ex=PATTERN Omit any file that match PATTERN. PATTERN is a
930
+** ex=PATTERN Omit any file that matches PATTERN. PATTERN is a
931931
** comma-separated list of GLOB patterns, where each
932932
** pattern can optionally be quoted using ".." or '..'.
933933
** Any file matching both ex= and in= is excluded.
934934
**
935935
** Robot Defenses:
@@ -1108,11 +1108,11 @@
11081108
** The items in each group are:
11091109
**
11101110
** | COUNT TAG MAX_AGE COMMENT
11111111
**
11121112
** COUNT is the number of check-ins to match, starting with the most
1113
-** recent and working bacwards in time. Check-ins match if they contain
1113
+** recent and working backwards in time. Check-ins match if they contain
11141114
** the tag TAG. If MAX_AGE is not an empty string, then it specifies
11151115
** the maximum age of any matching check-in. COMMENT is an optional
11161116
** comment for each match.
11171117
**
11181118
** The special value of "OPEN-LEAF" for TAG matches any check-in that
11191119
--- src/tar.c
+++ src/tar.c
@@ -915,21 +915,21 @@
915 **
916 ** r=TAG TAG identifies the check-in that is turned into a
917 ** compressed tarball. The default value is the name of
918 ** the main branch (usually "trunk").
919 ** If r= is omitted and if the name= query parameter
920 ** contains one "/" character then the of part the
921 ** name= value before the / becomes the TAG and the
922 ** part of the name= value after the / is the download
923 ** filename. If no check-in is specified by either
924 ** name= or r=, then the name of the main branch
925 ** (usually "trunk") is used.
926 **
927 ** in=PATTERN Only include files that match the comma-separated
928 ** list of GLOB patterns in PATTERN, as with ex=
929 **
930 ** ex=PATTERN Omit any file that match PATTERN. PATTERN is a
931 ** comma-separated list of GLOB patterns, where each
932 ** pattern can optionally be quoted using ".." or '..'.
933 ** Any file matching both ex= and in= is excluded.
934 **
935 ** Robot Defenses:
@@ -1108,11 +1108,11 @@
1108 ** The items in each group are:
1109 **
1110 ** | COUNT TAG MAX_AGE COMMENT
1111 **
1112 ** COUNT is the number of check-ins to match, starting with the most
1113 ** recent and working bacwards in time. Check-ins match if they contain
1114 ** the tag TAG. If MAX_AGE is not an empty string, then it specifies
1115 ** the maximum age of any matching check-in. COMMENT is an optional
1116 ** comment for each match.
1117 **
1118 ** The special value of "OPEN-LEAF" for TAG matches any check-in that
1119
--- src/tar.c
+++ src/tar.c
@@ -915,21 +915,21 @@
915 **
916 ** r=TAG TAG identifies the check-in that is turned into a
917 ** compressed tarball. The default value is the name of
918 ** the main branch (usually "trunk").
919 ** If r= is omitted and if the name= query parameter
920 ** contains one "/" character then the part of the
921 ** name= value before the / becomes the TAG and the
922 ** part of the name= value after the / is the download
923 ** filename. If no check-in is specified by either
924 ** name= or r=, then the name of the main branch
925 ** (usually "trunk") is used.
926 **
927 ** in=PATTERN Only include files that match the comma-separated
928 ** list of GLOB patterns in PATTERN, as with ex=
929 **
930 ** ex=PATTERN Omit any file that matches PATTERN. PATTERN is a
931 ** comma-separated list of GLOB patterns, where each
932 ** pattern can optionally be quoted using ".." or '..'.
933 ** Any file matching both ex= and in= is excluded.
934 **
935 ** Robot Defenses:
@@ -1108,11 +1108,11 @@
1108 ** The items in each group are:
1109 **
1110 ** | COUNT TAG MAX_AGE COMMENT
1111 **
1112 ** COUNT is the number of check-ins to match, starting with the most
1113 ** recent and working backwards in time. Check-ins match if they contain
1114 ** the tag TAG. If MAX_AGE is not an empty string, then it specifies
1115 ** the maximum age of any matching check-in. COMMENT is an optional
1116 ** comment for each match.
1117 **
1118 ** The special value of "OPEN-LEAF" for TAG matches any check-in that
1119
+17 -12
--- src/th.c
+++ src/th.c
@@ -947,11 +947,11 @@
947947
zInput += nSpace;
948948
nInput -= nSpace;
949949
zFirst = zInput;
950950
951951
/* Check for a comment. If found, skip to the end of the line. */
952
- if( zInput[0]=='#' ){
952
+ if( nInput>0 && zInput[0]=='#' ){
953953
while( !thEndOfLine(zInput, nInput) ){
954954
zInput++;
955955
nInput--;
956956
}
957957
continue;
@@ -958,11 +958,11 @@
958958
}
959959
960960
/* Gobble up input a word at a time until the end of the command
961961
** (a semi-colon or end of line).
962962
*/
963
- while( rc==TH_OK && *zInput!=';' && !thEndOfLine(zInput, nInput) ){
963
+ while( rc==TH_OK && !thEndOfLine(zInput, nInput) && *zInput!=';' ){
964964
int nWord=0;
965965
thNextSpace(interp, zInput, nInput, &nSpace);
966966
rc = thNextWord(interp, &zInput[nSpace], nInput-nSpace, &nWord, 1);
967967
zInput += (nSpace+nWord);
968968
nInput -= (nSpace+nWord);
@@ -2166,31 +2166,33 @@
21662166
}
21672167
}
21682168
}
21692169
21702170
if( rc==TH_OK && eArgType==ARG_INTEGER ){
2171
+ unsigned int uLeft = (unsigned int)iLeft;
2172
+ unsigned int uRight = (unsigned int)iRight;
21712173
int iRes = 0;
21722174
switch( pExpr->pOp->eOp ) {
2173
- case OP_MULTIPLY: iRes = iLeft*iRight; break;
2175
+ case OP_MULTIPLY: iRes = (int)(uLeft*uRight); break;
21742176
case OP_DIVIDE:
21752177
if( !iRight ){
21762178
Th_ErrorMessage(interp, "Divide by 0:", zLeft, nLeft);
21772179
rc = TH_ERROR;
21782180
goto finish;
21792181
}
2180
- iRes = iLeft/iRight;
2182
+ iRes = iRight==(-1) ? (int)(0u-uLeft) : iLeft/iRight;
21812183
break;
21822184
case OP_MODULUS:
21832185
if( !iRight ){
21842186
Th_ErrorMessage(interp, "Modulo by 0:", zLeft, nLeft);
21852187
rc = TH_ERROR;
21862188
goto finish;
21872189
}
2188
- iRes = iLeft%iRight;
2190
+ iRes = iRight==(-1) ? 0 : iLeft%iRight;
21892191
break;
2190
- case OP_ADD: iRes = iLeft+iRight; break;
2191
- case OP_SUBTRACT: iRes = iLeft-iRight; break;
2192
+ case OP_ADD: iRes = (int)(uLeft+uRight); break;
2193
+ case OP_SUBTRACT: iRes = (int)(uLeft-uRight); break;
21922194
case OP_LEFTSHIFT: {
21932195
iRes = (int)(((unsigned int)iLeft)<<(iRight&0x1f));
21942196
break;
21952197
}
21962198
case OP_RIGHTSHIFT: iRes = iLeft>>(iRight&0x1f); break;
@@ -2203,11 +2205,11 @@
22032205
case OP_BITWISE_AND: iRes = iLeft&iRight; break;
22042206
case OP_BITWISE_XOR: iRes = iLeft^iRight; break;
22052207
case OP_BITWISE_OR: iRes = iLeft|iRight; break;
22062208
case OP_LOGICAL_AND: iRes = iLeft&&iRight; break;
22072209
case OP_LOGICAL_OR: iRes = iLeft||iRight; break;
2208
- case OP_UNARY_MINUS: iRes = -iLeft; break;
2210
+ case OP_UNARY_MINUS: iRes = (int)(0u-uLeft); break;
22092211
case OP_UNARY_PLUS: iRes = +iLeft; break;
22102212
case OP_BITWISE_NOT: iRes = ~iLeft; break;
22112213
case OP_LOGICAL_NOT: iRes = !iLeft; break;
22122214
default: assert(!"Internal error");
22132215
}
@@ -2822,14 +2824,17 @@
28222824
** If successful, store the result in *piOut and return TH_OK.
28232825
**
28242826
** If the string cannot be converted to an integer, return TH_ERROR.
28252827
** If the interp argument is not NULL, leave an error message in the
28262828
** interpreter result too.
2829
+**
2830
+** A value too large for an int wraps around. The arithmetic is done on
2831
+** an unsigned int, for which that is defined.
28272832
*/
28282833
int Th_ToInt(Th_Interp *interp, const char *z, int n, int *piOut){
28292834
int i = 0;
2830
- int iOut = 0;
2835
+ unsigned int iOut = 0;
28312836
int base = 10;
28322837
int (*isdigit)(char) = th_isdigit;
28332838
28342839
if( n<0 ){
28352840
n = th_strlen(z);
@@ -2866,18 +2871,18 @@
28662871
}else if( c>='A' ){
28672872
c -= 'A'-10;
28682873
}else{
28692874
c -= '0';
28702875
}
2871
- iOut = iOut * base + c;
2876
+ iOut = iOut * (unsigned int)base + (unsigned int)c;
28722877
}
28732878
28742879
if( n>0 && z[0]=='-' ){
2875
- iOut *= -1;
2880
+ iOut = 0u - iOut;
28762881
}
28772882
2878
- *piOut = iOut;
2883
+ *piOut = (int)iOut;
28792884
return TH_OK;
28802885
}
28812886
28822887
/*
28832888
** Try to convert the string passed as arguments (z, n) to a double.
28842889
--- src/th.c
+++ src/th.c
@@ -947,11 +947,11 @@
947 zInput += nSpace;
948 nInput -= nSpace;
949 zFirst = zInput;
950
951 /* Check for a comment. If found, skip to the end of the line. */
952 if( zInput[0]=='#' ){
953 while( !thEndOfLine(zInput, nInput) ){
954 zInput++;
955 nInput--;
956 }
957 continue;
@@ -958,11 +958,11 @@
958 }
959
960 /* Gobble up input a word at a time until the end of the command
961 ** (a semi-colon or end of line).
962 */
963 while( rc==TH_OK && *zInput!=';' && !thEndOfLine(zInput, nInput) ){
964 int nWord=0;
965 thNextSpace(interp, zInput, nInput, &nSpace);
966 rc = thNextWord(interp, &zInput[nSpace], nInput-nSpace, &nWord, 1);
967 zInput += (nSpace+nWord);
968 nInput -= (nSpace+nWord);
@@ -2166,31 +2166,33 @@
2166 }
2167 }
2168 }
2169
2170 if( rc==TH_OK && eArgType==ARG_INTEGER ){
 
 
2171 int iRes = 0;
2172 switch( pExpr->pOp->eOp ) {
2173 case OP_MULTIPLY: iRes = iLeft*iRight; break;
2174 case OP_DIVIDE:
2175 if( !iRight ){
2176 Th_ErrorMessage(interp, "Divide by 0:", zLeft, nLeft);
2177 rc = TH_ERROR;
2178 goto finish;
2179 }
2180 iRes = iLeft/iRight;
2181 break;
2182 case OP_MODULUS:
2183 if( !iRight ){
2184 Th_ErrorMessage(interp, "Modulo by 0:", zLeft, nLeft);
2185 rc = TH_ERROR;
2186 goto finish;
2187 }
2188 iRes = iLeft%iRight;
2189 break;
2190 case OP_ADD: iRes = iLeft+iRight; break;
2191 case OP_SUBTRACT: iRes = iLeft-iRight; break;
2192 case OP_LEFTSHIFT: {
2193 iRes = (int)(((unsigned int)iLeft)<<(iRight&0x1f));
2194 break;
2195 }
2196 case OP_RIGHTSHIFT: iRes = iLeft>>(iRight&0x1f); break;
@@ -2203,11 +2205,11 @@
2203 case OP_BITWISE_AND: iRes = iLeft&iRight; break;
2204 case OP_BITWISE_XOR: iRes = iLeft^iRight; break;
2205 case OP_BITWISE_OR: iRes = iLeft|iRight; break;
2206 case OP_LOGICAL_AND: iRes = iLeft&&iRight; break;
2207 case OP_LOGICAL_OR: iRes = iLeft||iRight; break;
2208 case OP_UNARY_MINUS: iRes = -iLeft; break;
2209 case OP_UNARY_PLUS: iRes = +iLeft; break;
2210 case OP_BITWISE_NOT: iRes = ~iLeft; break;
2211 case OP_LOGICAL_NOT: iRes = !iLeft; break;
2212 default: assert(!"Internal error");
2213 }
@@ -2822,14 +2824,17 @@
2822 ** If successful, store the result in *piOut and return TH_OK.
2823 **
2824 ** If the string cannot be converted to an integer, return TH_ERROR.
2825 ** If the interp argument is not NULL, leave an error message in the
2826 ** interpreter result too.
 
 
 
2827 */
2828 int Th_ToInt(Th_Interp *interp, const char *z, int n, int *piOut){
2829 int i = 0;
2830 int iOut = 0;
2831 int base = 10;
2832 int (*isdigit)(char) = th_isdigit;
2833
2834 if( n<0 ){
2835 n = th_strlen(z);
@@ -2866,18 +2871,18 @@
2866 }else if( c>='A' ){
2867 c -= 'A'-10;
2868 }else{
2869 c -= '0';
2870 }
2871 iOut = iOut * base + c;
2872 }
2873
2874 if( n>0 && z[0]=='-' ){
2875 iOut *= -1;
2876 }
2877
2878 *piOut = iOut;
2879 return TH_OK;
2880 }
2881
2882 /*
2883 ** Try to convert the string passed as arguments (z, n) to a double.
2884
--- src/th.c
+++ src/th.c
@@ -947,11 +947,11 @@
947 zInput += nSpace;
948 nInput -= nSpace;
949 zFirst = zInput;
950
951 /* Check for a comment. If found, skip to the end of the line. */
952 if( nInput>0 && zInput[0]=='#' ){
953 while( !thEndOfLine(zInput, nInput) ){
954 zInput++;
955 nInput--;
956 }
957 continue;
@@ -958,11 +958,11 @@
958 }
959
960 /* Gobble up input a word at a time until the end of the command
961 ** (a semi-colon or end of line).
962 */
963 while( rc==TH_OK && !thEndOfLine(zInput, nInput) && *zInput!=';' ){
964 int nWord=0;
965 thNextSpace(interp, zInput, nInput, &nSpace);
966 rc = thNextWord(interp, &zInput[nSpace], nInput-nSpace, &nWord, 1);
967 zInput += (nSpace+nWord);
968 nInput -= (nSpace+nWord);
@@ -2166,31 +2166,33 @@
2166 }
2167 }
2168 }
2169
2170 if( rc==TH_OK && eArgType==ARG_INTEGER ){
2171 unsigned int uLeft = (unsigned int)iLeft;
2172 unsigned int uRight = (unsigned int)iRight;
2173 int iRes = 0;
2174 switch( pExpr->pOp->eOp ) {
2175 case OP_MULTIPLY: iRes = (int)(uLeft*uRight); break;
2176 case OP_DIVIDE:
2177 if( !iRight ){
2178 Th_ErrorMessage(interp, "Divide by 0:", zLeft, nLeft);
2179 rc = TH_ERROR;
2180 goto finish;
2181 }
2182 iRes = iRight==(-1) ? (int)(0u-uLeft) : iLeft/iRight;
2183 break;
2184 case OP_MODULUS:
2185 if( !iRight ){
2186 Th_ErrorMessage(interp, "Modulo by 0:", zLeft, nLeft);
2187 rc = TH_ERROR;
2188 goto finish;
2189 }
2190 iRes = iRight==(-1) ? 0 : iLeft%iRight;
2191 break;
2192 case OP_ADD: iRes = (int)(uLeft+uRight); break;
2193 case OP_SUBTRACT: iRes = (int)(uLeft-uRight); break;
2194 case OP_LEFTSHIFT: {
2195 iRes = (int)(((unsigned int)iLeft)<<(iRight&0x1f));
2196 break;
2197 }
2198 case OP_RIGHTSHIFT: iRes = iLeft>>(iRight&0x1f); break;
@@ -2203,11 +2205,11 @@
2205 case OP_BITWISE_AND: iRes = iLeft&iRight; break;
2206 case OP_BITWISE_XOR: iRes = iLeft^iRight; break;
2207 case OP_BITWISE_OR: iRes = iLeft|iRight; break;
2208 case OP_LOGICAL_AND: iRes = iLeft&&iRight; break;
2209 case OP_LOGICAL_OR: iRes = iLeft||iRight; break;
2210 case OP_UNARY_MINUS: iRes = (int)(0u-uLeft); break;
2211 case OP_UNARY_PLUS: iRes = +iLeft; break;
2212 case OP_BITWISE_NOT: iRes = ~iLeft; break;
2213 case OP_LOGICAL_NOT: iRes = !iLeft; break;
2214 default: assert(!"Internal error");
2215 }
@@ -2822,14 +2824,17 @@
2824 ** If successful, store the result in *piOut and return TH_OK.
2825 **
2826 ** If the string cannot be converted to an integer, return TH_ERROR.
2827 ** If the interp argument is not NULL, leave an error message in the
2828 ** interpreter result too.
2829 **
2830 ** A value too large for an int wraps around. The arithmetic is done on
2831 ** an unsigned int, for which that is defined.
2832 */
2833 int Th_ToInt(Th_Interp *interp, const char *z, int n, int *piOut){
2834 int i = 0;
2835 unsigned int iOut = 0;
2836 int base = 10;
2837 int (*isdigit)(char) = th_isdigit;
2838
2839 if( n<0 ){
2840 n = th_strlen(z);
@@ -2866,18 +2871,18 @@
2871 }else if( c>='A' ){
2872 c -= 'A'-10;
2873 }else{
2874 c -= '0';
2875 }
2876 iOut = iOut * (unsigned int)base + (unsigned int)c;
2877 }
2878
2879 if( n>0 && z[0]=='-' ){
2880 iOut = 0u - iOut;
2881 }
2882
2883 *piOut = (int)iOut;
2884 return TH_OK;
2885 }
2886
2887 /*
2888 ** Try to convert the string passed as arguments (z, n) to a double.
2889
+3 -3
--- src/timeline.c
+++ src/timeline.c
@@ -1858,15 +1858,15 @@
18581858
** forks Show only forks and their children
18591859
** cherrypicks Show all cherrypicks
18601860
** ym=YYYYMM Show only events for the given year/month
18611861
** yw=YYYYWW Show only events for the given week of the given year
18621862
** yw=YYYYMMDD Show events for the week that includes the given day
1863
-** ymd=YYYYMMDD Show only events on the given day. The use "ymd=now"
1863
+** ymd=YYYYMMDD Show only events on the given day. Use "ymd=now"
18641864
** to see all changes for the current week. Add "z" at end
18651865
** to divide days at UTC instead of localtime days.
18661866
** Use ymd=YYYYMMDD-YYYYMMDD (with optional "z") for a range.
1867
-** year=YYYY Show only events on the given year. The use "year=0"
1867
+** year=YYYY Show only events on the given year. Use "year=0"
18681868
** to see all changes for the current year.
18691869
** days=N Show events over the previous N days
18701870
** datefmt=N Override the date format: 0=HH:MM, 1=HH:MM:SS,
18711871
** 2=YYYY-MM-DD HH:MM:SS, 3=YYMMDD HH:MM, and 4 means "off".
18721872
** bisect Show the check-ins that are in the current bisect
@@ -3984,11 +3984,11 @@
39843984
** PATH can be a file or a subdirectory.
39853985
** -q|--quiet Do not print notifications at the end of the timeline.
39863986
** -r|--reverse Show items in chronological order.
39873987
** -R REPO_FILE Specifies the repository db to use. Default is
39883988
** the current check-out's repository.
3989
-** -s|--summmary Truncate comments after the first blank line.
3989
+** -s|--summary Truncate comments after the first blank line.
39903990
** --sql Show the SQL used to generate the timeline
39913991
** -t|--type TYPE Output items from the given types only, such as:
39923992
** ci = file commits only
39933993
** e = technical notes only
39943994
** f = forum posts only
39953995
--- src/timeline.c
+++ src/timeline.c
@@ -1858,15 +1858,15 @@
1858 ** forks Show only forks and their children
1859 ** cherrypicks Show all cherrypicks
1860 ** ym=YYYYMM Show only events for the given year/month
1861 ** yw=YYYYWW Show only events for the given week of the given year
1862 ** yw=YYYYMMDD Show events for the week that includes the given day
1863 ** ymd=YYYYMMDD Show only events on the given day. The use "ymd=now"
1864 ** to see all changes for the current week. Add "z" at end
1865 ** to divide days at UTC instead of localtime days.
1866 ** Use ymd=YYYYMMDD-YYYYMMDD (with optional "z") for a range.
1867 ** year=YYYY Show only events on the given year. The use "year=0"
1868 ** to see all changes for the current year.
1869 ** days=N Show events over the previous N days
1870 ** datefmt=N Override the date format: 0=HH:MM, 1=HH:MM:SS,
1871 ** 2=YYYY-MM-DD HH:MM:SS, 3=YYMMDD HH:MM, and 4 means "off".
1872 ** bisect Show the check-ins that are in the current bisect
@@ -3984,11 +3984,11 @@
3984 ** PATH can be a file or a subdirectory.
3985 ** -q|--quiet Do not print notifications at the end of the timeline.
3986 ** -r|--reverse Show items in chronological order.
3987 ** -R REPO_FILE Specifies the repository db to use. Default is
3988 ** the current check-out's repository.
3989 ** -s|--summmary Truncate comments after the first blank line.
3990 ** --sql Show the SQL used to generate the timeline
3991 ** -t|--type TYPE Output items from the given types only, such as:
3992 ** ci = file commits only
3993 ** e = technical notes only
3994 ** f = forum posts only
3995
--- src/timeline.c
+++ src/timeline.c
@@ -1858,15 +1858,15 @@
1858 ** forks Show only forks and their children
1859 ** cherrypicks Show all cherrypicks
1860 ** ym=YYYYMM Show only events for the given year/month
1861 ** yw=YYYYWW Show only events for the given week of the given year
1862 ** yw=YYYYMMDD Show events for the week that includes the given day
1863 ** ymd=YYYYMMDD Show only events on the given day. Use "ymd=now"
1864 ** to see all changes for the current week. Add "z" at end
1865 ** to divide days at UTC instead of localtime days.
1866 ** Use ymd=YYYYMMDD-YYYYMMDD (with optional "z") for a range.
1867 ** year=YYYY Show only events on the given year. Use "year=0"
1868 ** to see all changes for the current year.
1869 ** days=N Show events over the previous N days
1870 ** datefmt=N Override the date format: 0=HH:MM, 1=HH:MM:SS,
1871 ** 2=YYYY-MM-DD HH:MM:SS, 3=YYMMDD HH:MM, and 4 means "off".
1872 ** bisect Show the check-ins that are in the current bisect
@@ -3984,11 +3984,11 @@
3984 ** PATH can be a file or a subdirectory.
3985 ** -q|--quiet Do not print notifications at the end of the timeline.
3986 ** -r|--reverse Show items in chronological order.
3987 ** -R REPO_FILE Specifies the repository db to use. Default is
3988 ** the current check-out's repository.
3989 ** -s|--summary Truncate comments after the first blank line.
3990 ** --sql Show the SQL used to generate the timeline
3991 ** -t|--type TYPE Output items from the given types only, such as:
3992 ** ci = file commits only
3993 ** e = technical notes only
3994 ** f = forum posts only
3995
+2 -2
--- src/tkt.c
+++ src/tkt.c
@@ -1857,12 +1857,12 @@
18571857
zValue = aField[iF].zValue;
18581858
aUsed[iF] = JCARD_ASSIGN;
18591859
}else{
18601860
continue;
18611861
}
1862
- if( aField[i].zName
1863
- && strncmp(aField[i].zName, "private_", 8)==0 ){
1862
+ if( aField[iF].zName
1863
+ && strncmp(aField[iF].zName, "private_", 8)==0 ){
18641864
zValue = db_conceal(zValue, strlen(zValue));
18651865
blob_appendf(&tktchng, "J%s%s %s\n", zPfx, aField[iF].zName, zValue);
18661866
aUsed[iF] = JCARD_PRIVATE;
18671867
}else{
18681868
blob_appendf(&tktchng, "J%s%s %#F\n", zPfx,
18691869
--- src/tkt.c
+++ src/tkt.c
@@ -1857,12 +1857,12 @@
1857 zValue = aField[iF].zValue;
1858 aUsed[iF] = JCARD_ASSIGN;
1859 }else{
1860 continue;
1861 }
1862 if( aField[i].zName
1863 && strncmp(aField[i].zName, "private_", 8)==0 ){
1864 zValue = db_conceal(zValue, strlen(zValue));
1865 blob_appendf(&tktchng, "J%s%s %s\n", zPfx, aField[iF].zName, zValue);
1866 aUsed[iF] = JCARD_PRIVATE;
1867 }else{
1868 blob_appendf(&tktchng, "J%s%s %#F\n", zPfx,
1869
--- src/tkt.c
+++ src/tkt.c
@@ -1857,12 +1857,12 @@
1857 zValue = aField[iF].zValue;
1858 aUsed[iF] = JCARD_ASSIGN;
1859 }else{
1860 continue;
1861 }
1862 if( aField[iF].zName
1863 && strncmp(aField[iF].zName, "private_", 8)==0 ){
1864 zValue = db_conceal(zValue, strlen(zValue));
1865 blob_appendf(&tktchng, "J%s%s %s\n", zPfx, aField[iF].zName, zValue);
1866 aUsed[iF] = JCARD_PRIVATE;
1867 }else{
1868 blob_appendf(&tktchng, "J%s%s %#F\n", zPfx,
1869
+11 -1
--- src/utf8.c
+++ src/utf8.c
@@ -140,11 +140,21 @@
140140
#elif defined(__CYGWIN__)
141141
char *zOut;
142142
zOut = fossil_strdup(zPath);
143143
return zOut;
144144
#elif defined(__APPLE__) && !defined(WITHOUT_ICONV)
145
- char *zIn = (char*)zPath;
145
+ /* macOS gives us a pathname already in Apple's decomposed form. HFS+
146
+ ** stores names "fully decomposed and in canonical order" as per Unicode
147
+ ** 3.2, while APFS uses the same decomposed form but compares names
148
+ ** normalization-insensitively as per Unicode 9.0 basis (see Apple TN1150,
149
+ ** "Unicode Subtleties"; Apple File System Guide FAQ). iconv from
150
+ ** UTF-8-MAC recomposes the sequence to precomposed UTF-8. So this is a
151
+ ** composition pass, not full NFC. This function relies on the marks being
152
+ ** in canonical order as per a real macOS pathname, and it doesn't touch
153
+ ** characters Apple does not decompose, such as the U+F900-U+FAFF CJK
154
+ ** compatibility ideographs, again as per Apple documentation. */
155
+ char *zIn = (char*)zPath;
146156
char *zOut;
147157
iconv_t cd;
148158
size_t n, x;
149159
for(n=0; zIn[n]>0 && zIn[n]<=0x7f; n++){}
150160
if( zIn[n]!=0 && (cd = iconv_open("UTF-8", "UTF-8-MAC"))!=(iconv_t)-1 ){
151161
--- src/utf8.c
+++ src/utf8.c
@@ -140,11 +140,21 @@
140 #elif defined(__CYGWIN__)
141 char *zOut;
142 zOut = fossil_strdup(zPath);
143 return zOut;
144 #elif defined(__APPLE__) && !defined(WITHOUT_ICONV)
145 char *zIn = (char*)zPath;
 
 
 
 
 
 
 
 
 
 
146 char *zOut;
147 iconv_t cd;
148 size_t n, x;
149 for(n=0; zIn[n]>0 && zIn[n]<=0x7f; n++){}
150 if( zIn[n]!=0 && (cd = iconv_open("UTF-8", "UTF-8-MAC"))!=(iconv_t)-1 ){
151
--- src/utf8.c
+++ src/utf8.c
@@ -140,11 +140,21 @@
140 #elif defined(__CYGWIN__)
141 char *zOut;
142 zOut = fossil_strdup(zPath);
143 return zOut;
144 #elif defined(__APPLE__) && !defined(WITHOUT_ICONV)
145 /* macOS gives us a pathname already in Apple's decomposed form. HFS+
146 ** stores names "fully decomposed and in canonical order" as per Unicode
147 ** 3.2, while APFS uses the same decomposed form but compares names
148 ** normalization-insensitively as per Unicode 9.0 basis (see Apple TN1150,
149 ** "Unicode Subtleties"; Apple File System Guide FAQ). iconv from
150 ** UTF-8-MAC recomposes the sequence to precomposed UTF-8. So this is a
151 ** composition pass, not full NFC. This function relies on the marks being
152 ** in canonical order as per a real macOS pathname, and it doesn't touch
153 ** characters Apple does not decompose, such as the U+F900-U+FAFF CJK
154 ** compatibility ideographs, again as per Apple documentation. */
155 char *zIn = (char*)zPath;
156 char *zOut;
157 iconv_t cd;
158 size_t n, x;
159 for(n=0; zIn[n]>0 && zIn[n]<=0x7f; n++){}
160 if( zIn[n]!=0 && (cd = iconv_open("UTF-8", "UTF-8-MAC"))!=(iconv_t)-1 ){
161
+41 -12
--- src/wiki.c
+++ src/wiki.c
@@ -168,27 +168,56 @@
168168
"text/x-markdown", "Markdown", "markdown",
169169
"text/plain", "Plain Text", "plain"
170170
};
171171
172172
/*
173
-** Only allow certain mimetypes through.
174
-** All others become "text/x-fossil-wiki"
173
+** If zMimetype is one of the supported wiki content mimetypes or a
174
+** shorthand form of it, returns the full mimetype string, else
175
+** returns 0.
176
+*/
177
+const char * wiki_is_valid_mimetype(const char *zMimetype){
178
+ int i;
179
+ for(i=0; i<count(azStyles); i+=3){
180
+ if( fossil_strcmp(zMimetype,azStyles[i+2])==0
181
+ || fossil_strcmp(zMimetype,azStyles[i])==0 ){
182
+ return azStyles[i];
183
+ }
184
+ }
185
+ if( fossil_strcmp(zMimetype, "text/x-markdown")==0
186
+ || fossil_strcmp(zMimetype, "text/plain")==0 ){
187
+ return zMimetype;
188
+ }
189
+ if( fossil_strcmp(zMimetype, "plaintext")==0 ){
190
+ /* Inconsistent "plain" vs "plaintext" in some commands/API. */
191
+ return "text/plain";
192
+ }
193
+ return 0;
194
+}
195
+
196
+/*
197
+** Only allow certain mimetypes through. All others become
198
+** "text/x-fossil-wiki". See wiki_is_valid_mimetype().
175199
*/
176200
const char *wiki_filter_mimetypes(const char *zMimetype){
177201
if( zMimetype!=0 ){
178
- int i;
179
- for(i=0; i<count(azStyles); i+=3){
180
- if( fossil_strcmp(zMimetype,azStyles[i+2])==0 ){
181
- return azStyles[i];
182
- }
183
- }
184
- if( fossil_strcmp(zMimetype, "text/x-markdown")==0
185
- || fossil_strcmp(zMimetype, "text/plain")==0 ){
186
- return zMimetype;
202
+ zMimetype = wiki_is_valid_mimetype(zMimetype);
203
+ }
204
+ return zMimetype ? zMimetype : "text/x-fossil-wiki";
205
+}
206
+
207
+char const *wiki_guess_filename_mimetype(const char *zFilename,
208
+ const char *zDefault){
209
+ if( zFilename ){
210
+ if( 0==sqlite3_strglob("*.md", zFilename) ){
211
+ return "text/x-markdown";
212
+ }else if( 0==sqlite3_strglob("*.txt", zFilename) ){
213
+ return "text/plain";
214
+ }else if( 0==sqlite3_strglob("*.wiki", zFilename) ){
215
+ return "text/x-fossil-wiki";
187216
}
188217
}
189
- return "text/x-fossil-wiki";
218
+ return 0;
190219
}
191220
192221
/*
193222
** Render wiki text according to its mimetype.
194223
**
195224
--- src/wiki.c
+++ src/wiki.c
@@ -168,27 +168,56 @@
168 "text/x-markdown", "Markdown", "markdown",
169 "text/plain", "Plain Text", "plain"
170 };
171
172 /*
173 ** Only allow certain mimetypes through.
174 ** All others become "text/x-fossil-wiki"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175 */
176 const char *wiki_filter_mimetypes(const char *zMimetype){
177 if( zMimetype!=0 ){
178 int i;
179 for(i=0; i<count(azStyles); i+=3){
180 if( fossil_strcmp(zMimetype,azStyles[i+2])==0 ){
181 return azStyles[i];
182 }
183 }
184 if( fossil_strcmp(zMimetype, "text/x-markdown")==0
185 || fossil_strcmp(zMimetype, "text/plain")==0 ){
186 return zMimetype;
 
 
 
 
 
187 }
188 }
189 return "text/x-fossil-wiki";
190 }
191
192 /*
193 ** Render wiki text according to its mimetype.
194 **
195
--- src/wiki.c
+++ src/wiki.c
@@ -168,27 +168,56 @@
168 "text/x-markdown", "Markdown", "markdown",
169 "text/plain", "Plain Text", "plain"
170 };
171
172 /*
173 ** If zMimetype is one of the supported wiki content mimetypes or a
174 ** shorthand form of it, returns the full mimetype string, else
175 ** returns 0.
176 */
177 const char * wiki_is_valid_mimetype(const char *zMimetype){
178 int i;
179 for(i=0; i<count(azStyles); i+=3){
180 if( fossil_strcmp(zMimetype,azStyles[i+2])==0
181 || fossil_strcmp(zMimetype,azStyles[i])==0 ){
182 return azStyles[i];
183 }
184 }
185 if( fossil_strcmp(zMimetype, "text/x-markdown")==0
186 || fossil_strcmp(zMimetype, "text/plain")==0 ){
187 return zMimetype;
188 }
189 if( fossil_strcmp(zMimetype, "plaintext")==0 ){
190 /* Inconsistent "plain" vs "plaintext" in some commands/API. */
191 return "text/plain";
192 }
193 return 0;
194 }
195
196 /*
197 ** Only allow certain mimetypes through. All others become
198 ** "text/x-fossil-wiki". See wiki_is_valid_mimetype().
199 */
200 const char *wiki_filter_mimetypes(const char *zMimetype){
201 if( zMimetype!=0 ){
202 zMimetype = wiki_is_valid_mimetype(zMimetype);
203 }
204 return zMimetype ? zMimetype : "text/x-fossil-wiki";
205 }
206
207 char const *wiki_guess_filename_mimetype(const char *zFilename,
208 const char *zDefault){
209 if( zFilename ){
210 if( 0==sqlite3_strglob("*.md", zFilename) ){
211 return "text/x-markdown";
212 }else if( 0==sqlite3_strglob("*.txt", zFilename) ){
213 return "text/plain";
214 }else if( 0==sqlite3_strglob("*.wiki", zFilename) ){
215 return "text/x-fossil-wiki";
216 }
217 }
218 return 0;
219 }
220
221 /*
222 ** Render wiki text according to its mimetype.
223 **
224
+83 -12
--- src/xfer.c
+++ src/xfer.c
@@ -206,11 +206,17 @@
206206
blob_reset(&src);
207207
blob_reset(&content);
208208
return;
209209
}
210210
pXfer->nDeltaRcvd++;
211
- blob_delta_apply(&src, &content, &next);
211
+ if( blob_delta_apply(&src, &content, &next)<0 ){
212
+ blob_appendf(&pXfer->err, "invalid delta on received artifact: %b",
213
+ pUuid);
214
+ blob_reset(&src);
215
+ blob_reset(&content);
216
+ return;
217
+ }
212218
blob_reset(&src);
213219
blob_reset(&content);
214220
content = next;
215221
}else{
216222
pXfer->nFileRcvd++;
@@ -250,16 +256,21 @@
250256
**
251257
** The original size of the HASH artifact is USIZE.
252258
**
253259
** If any error occurs, write a message into pErr which has already
254260
** be initialized to an empty string.
261
+**
262
+** Unless cloneFlag is set, the content must have the size USIZE and
263
+** give the HASH, or it is refused. The hash of a delta is checked only
264
+** if DELTASRC is at hand. A clone is not checked here.
255265
**
256266
** Any artifact successfully received by this routine is considered to
257267
** be public and is therefore removed from the "private" table.
258268
*/
259269
static void xfer_accept_compressed_file(
260270
Xfer *pXfer,
271
+ int cloneFlag,
261272
char **pzUuidList,
262273
int *pnUuidList
263274
){
264275
int szC; /* CSIZE */
265276
int szU; /* USIZE */
@@ -293,20 +304,60 @@
293304
}
294305
if( uuid_is_shunned(blob_str(&pXfer->aToken[1])) ){
295306
/* Ignore files that have been shunned */
296307
blob_reset(&content);
297308
return;
309
+ }
310
+ if( szU==0
311
+ && (blob_size(&content)<=4 || blob_uncompress(&content, &content))
312
+ ){
313
+ blob_appendf(&pXfer->err, "malformed cfile content");
314
+ blob_reset(&content);
315
+ return;
298316
}
299317
if( pXfer->nToken==5 ){
300318
srcid = rid_from_uuid(&pXfer->aToken[2], 1, isPriv);
301319
pXfer->nDeltaRcvd++;
302320
}else{
303321
srcid = 0;
304322
pXfer->nFileRcvd++;
323
+ }
324
+ if( !cloneFlag ){
325
+ Blob *pUuid = &pXfer->aToken[1];
326
+ Blob x; /* The content, uncompressed */
327
+ Blob src, next; /* Source of a delta, and the delta applied to it */
328
+ int ok = 1;
329
+ blob_zero(&x);
330
+ if( szU==0 ){
331
+ blob_copy(&x, &content);
332
+ }else if( blob_size(&content)<=4 || blob_uncompress(&content, &x) ){
333
+ blob_appendf(&pXfer->err, "malformed cfile content");
334
+ blob_reset(&content);
335
+ return;
336
+ }
337
+ if( srcid==0 ){
338
+ ok = (int)blob_size(&x)==szU
339
+ && hname_verify_hash(&x, blob_buffer(pUuid), blob_size(pUuid));
340
+ }else if( delta_output_size(blob_buffer(&x), blob_size(&x))!=szU ){
341
+ ok = 0;
342
+ }else if( content_get(srcid, &src) ){
343
+ blob_zero(&next);
344
+ ok = blob_delta_apply(&src, &x, &next)>=0
345
+ && hname_verify_hash(&next, blob_buffer(pUuid), blob_size(pUuid));
346
+ blob_reset(&next);
347
+ blob_reset(&src);
348
+ }
349
+ blob_reset(&x);
350
+ if( !ok ){
351
+ blob_appendf(&pXfer->err,
352
+ "wrong size or hash on received artifact: %b", pUuid);
353
+ blob_reset(&content);
354
+ return;
355
+ }
305356
}
306357
rid = content_put_ex(&content, blob_str(&pXfer->aToken[1]), srcid,
307
- szC, isPriv);
358
+ szU, isPriv);
308359
Th_AppendToList(pzUuidList, pnUuidList, blob_str(&pXfer->aToken[1]),
309360
blob_size(&pXfer->aToken[1]));
310361
remote_has(rid);
311362
blob_reset(&content);
312363
}
@@ -375,10 +426,13 @@
375426
goto end_accept_unversioned_file;
376427
}
377428
378429
/* Make sure we have a valid g.rcvid marker */
379430
content_rcvid_init(0);
431
+
432
+ /* The table might not exist yet if the other side sent no uv-hash pragma */
433
+ unversioned_schema();
380434
381435
/* Check to see if current content really should be overwritten. Ideally,
382436
** a uvfile card should never have been sent unless the overwrite should
383437
** occur. But do not trust the sender. Double-check.
384438
*/
@@ -731,10 +785,11 @@
731785
int isClient /* True if sending from client to server */
732786
){
733787
Stmt q1;
734788
int isFull = !isClient && (int)blob_size(pXfer->pOut)>=pXfer->mxSend;
735789
790
+ unversioned_schema();
736791
if( isFull ) noContent = 1;
737792
if( noContent ){
738793
db_prepare(&q1,
739794
"SELECT mtime, hash, encoding, sz FROM unversioned WHERE name=%Q",
740795
zName
@@ -1409,11 +1464,11 @@
14091464
cgi_reset_content();
14101465
@ error not\sauthorized\sto\swrite%s(whyNotAuth())
14111466
nErr++;
14121467
break;
14131468
}
1414
- xfer_accept_compressed_file(&xfer, pzUuidList, pnUuidList);
1469
+ xfer_accept_compressed_file(&xfer, 0, pzUuidList, pnUuidList);
14151470
if( blob_size(&xfer.err) ){
14161471
cgi_reset_content();
14171472
@ error %T(blob_str(&xfer.err))
14181473
nErr++;
14191474
break;
@@ -2091,10 +2146,22 @@
20912146
** Floating-point absolute value
20922147
*/
20932148
static double fossil_fabs(double x){
20942149
return x>0.0 ? x : -x;
20952150
}
2151
+
2152
+/*
2153
+** Tell the user that unversioned content cannot be pushed because the
2154
+** server has sent the "uv-pull-only" pragma.
2155
+*/
2156
+static void uv_pull_only_warning(void){
2157
+ fossil_warning(
2158
+ "Warning: uv-pull-only \n"
2159
+ " Unable to push unversioned content because you lack\n"
2160
+ " sufficient permission on the server\n"
2161
+ );
2162
+}
20962163
20972164
/*
20982165
** Sync to the host identified in g.url.name and g.url.path. This
20992166
** routine is called by the client.
21002167
**
@@ -2170,14 +2237,13 @@
21702237
const char *zPX;
21712238
configRcvMask = 0;
21722239
configSendMask = 0;
21732240
syncFlags &= ~(SYNC_PUSH);
21742241
zPX = db_get("parent-project-code", 0);
2175
- if( zPX==0 || db_get("parent-project-name",0)==0 ){
2242
+ if( zPX==0 ){
21762243
fossil_fatal("there is no parent project: set the 'parent-project-code'"
2177
- " and 'parent-project-name' config parameters in order"
2178
- " to pull from a parent project");
2244
+ " config parameter in order to pull from a parent project");
21792245
}
21802246
if( zPX ){
21812247
zAltPCode = zPX;
21822248
}
21832249
}
@@ -2578,11 +2644,11 @@
25782644
** Client receives a compressed file transmitted from the server.
25792645
*/
25802646
if( blob_eq(&xfer.aToken[0],"cfile")
25812647
&& (syncFlags & (SYNC_PULL|SYNC_CLONE))!=0
25822648
){
2583
- xfer_accept_compressed_file(&xfer, 0, 0);
2649
+ xfer_accept_compressed_file(&xfer, (syncFlags & SYNC_CLONE)!=0, 0, 0);
25842650
nArtifactRcvd++;
25852651
}else
25862652
25872653
/* uvfile NAME MTIME HASH SIZE FLAGS \n CONTENT
25882654
**
@@ -2725,15 +2791,11 @@
27252791
"UPDATE unversioned SET mtime=%lld WHERE name=%Q", mtime, zName
27262792
);
27272793
db_unset("uv-hash", 0);
27282794
}
27292795
if( iStatus>=4 && uvPullOnly==1 ){
2730
- fossil_warning(
2731
- "Warning: uv-pull-only \n"
2732
- " Unable to push unversioned content because you lack\n"
2733
- " sufficient permission on the server\n"
2734
- );
2796
+ uv_pull_only_warning();
27352797
uvPullOnly = 2;
27362798
}
27372799
if( iStatus<=3 || uvPullOnly ){
27382800
db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
27392801
}else if( iStatus==4 ){
@@ -3033,10 +3095,19 @@
30333095
}
30343096
}
30353097
nUncRcvd += blob_size(&recv);
30363098
blob_reset(&recv);
30373099
nCycle++;
3100
+
3101
+ /* Also warn for files that no uvigot card named */
3102
+ if( uvPullOnly==1 && (syncFlags & SYNC_UV_REVERT)==0
3103
+ && db_exists("SELECT 1 FROM uv_tosend")
3104
+ ){
3105
+ uv_pull_only_warning();
3106
+ uvPullOnly = 2;
3107
+ db_multi_exec("DELETE FROM uv_tosend");
3108
+ }
30383109
30393110
/* Set go to 1 if we need to continue the sync/push/pull/clone for
30403111
** another round. Set go to 0 if it is time to quit. */
30413112
nFileRecv = xfer.nFileRcvd + xfer.nDeltaRcvd + xfer.nDanglingFile;
30423113
if( (nFileRecv>0 || newPhantom) && db_exists("SELECT 1 FROM phantom") ){
30433114
--- src/xfer.c
+++ src/xfer.c
@@ -206,11 +206,17 @@
206 blob_reset(&src);
207 blob_reset(&content);
208 return;
209 }
210 pXfer->nDeltaRcvd++;
211 blob_delta_apply(&src, &content, &next);
 
 
 
 
 
 
212 blob_reset(&src);
213 blob_reset(&content);
214 content = next;
215 }else{
216 pXfer->nFileRcvd++;
@@ -250,16 +256,21 @@
250 **
251 ** The original size of the HASH artifact is USIZE.
252 **
253 ** If any error occurs, write a message into pErr which has already
254 ** be initialized to an empty string.
 
 
 
 
255 **
256 ** Any artifact successfully received by this routine is considered to
257 ** be public and is therefore removed from the "private" table.
258 */
259 static void xfer_accept_compressed_file(
260 Xfer *pXfer,
 
261 char **pzUuidList,
262 int *pnUuidList
263 ){
264 int szC; /* CSIZE */
265 int szU; /* USIZE */
@@ -293,20 +304,60 @@
293 }
294 if( uuid_is_shunned(blob_str(&pXfer->aToken[1])) ){
295 /* Ignore files that have been shunned */
296 blob_reset(&content);
297 return;
 
 
 
 
 
 
 
298 }
299 if( pXfer->nToken==5 ){
300 srcid = rid_from_uuid(&pXfer->aToken[2], 1, isPriv);
301 pXfer->nDeltaRcvd++;
302 }else{
303 srcid = 0;
304 pXfer->nFileRcvd++;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305 }
306 rid = content_put_ex(&content, blob_str(&pXfer->aToken[1]), srcid,
307 szC, isPriv);
308 Th_AppendToList(pzUuidList, pnUuidList, blob_str(&pXfer->aToken[1]),
309 blob_size(&pXfer->aToken[1]));
310 remote_has(rid);
311 blob_reset(&content);
312 }
@@ -375,10 +426,13 @@
375 goto end_accept_unversioned_file;
376 }
377
378 /* Make sure we have a valid g.rcvid marker */
379 content_rcvid_init(0);
 
 
 
380
381 /* Check to see if current content really should be overwritten. Ideally,
382 ** a uvfile card should never have been sent unless the overwrite should
383 ** occur. But do not trust the sender. Double-check.
384 */
@@ -731,10 +785,11 @@
731 int isClient /* True if sending from client to server */
732 ){
733 Stmt q1;
734 int isFull = !isClient && (int)blob_size(pXfer->pOut)>=pXfer->mxSend;
735
 
736 if( isFull ) noContent = 1;
737 if( noContent ){
738 db_prepare(&q1,
739 "SELECT mtime, hash, encoding, sz FROM unversioned WHERE name=%Q",
740 zName
@@ -1409,11 +1464,11 @@
1409 cgi_reset_content();
1410 @ error not\sauthorized\sto\swrite%s(whyNotAuth())
1411 nErr++;
1412 break;
1413 }
1414 xfer_accept_compressed_file(&xfer, pzUuidList, pnUuidList);
1415 if( blob_size(&xfer.err) ){
1416 cgi_reset_content();
1417 @ error %T(blob_str(&xfer.err))
1418 nErr++;
1419 break;
@@ -2091,10 +2146,22 @@
2091 ** Floating-point absolute value
2092 */
2093 static double fossil_fabs(double x){
2094 return x>0.0 ? x : -x;
2095 }
 
 
 
 
 
 
 
 
 
 
 
 
2096
2097 /*
2098 ** Sync to the host identified in g.url.name and g.url.path. This
2099 ** routine is called by the client.
2100 **
@@ -2170,14 +2237,13 @@
2170 const char *zPX;
2171 configRcvMask = 0;
2172 configSendMask = 0;
2173 syncFlags &= ~(SYNC_PUSH);
2174 zPX = db_get("parent-project-code", 0);
2175 if( zPX==0 || db_get("parent-project-name",0)==0 ){
2176 fossil_fatal("there is no parent project: set the 'parent-project-code'"
2177 " and 'parent-project-name' config parameters in order"
2178 " to pull from a parent project");
2179 }
2180 if( zPX ){
2181 zAltPCode = zPX;
2182 }
2183 }
@@ -2578,11 +2644,11 @@
2578 ** Client receives a compressed file transmitted from the server.
2579 */
2580 if( blob_eq(&xfer.aToken[0],"cfile")
2581 && (syncFlags & (SYNC_PULL|SYNC_CLONE))!=0
2582 ){
2583 xfer_accept_compressed_file(&xfer, 0, 0);
2584 nArtifactRcvd++;
2585 }else
2586
2587 /* uvfile NAME MTIME HASH SIZE FLAGS \n CONTENT
2588 **
@@ -2725,15 +2791,11 @@
2725 "UPDATE unversioned SET mtime=%lld WHERE name=%Q", mtime, zName
2726 );
2727 db_unset("uv-hash", 0);
2728 }
2729 if( iStatus>=4 && uvPullOnly==1 ){
2730 fossil_warning(
2731 "Warning: uv-pull-only \n"
2732 " Unable to push unversioned content because you lack\n"
2733 " sufficient permission on the server\n"
2734 );
2735 uvPullOnly = 2;
2736 }
2737 if( iStatus<=3 || uvPullOnly ){
2738 db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
2739 }else if( iStatus==4 ){
@@ -3033,10 +3095,19 @@
3033 }
3034 }
3035 nUncRcvd += blob_size(&recv);
3036 blob_reset(&recv);
3037 nCycle++;
 
 
 
 
 
 
 
 
 
3038
3039 /* Set go to 1 if we need to continue the sync/push/pull/clone for
3040 ** another round. Set go to 0 if it is time to quit. */
3041 nFileRecv = xfer.nFileRcvd + xfer.nDeltaRcvd + xfer.nDanglingFile;
3042 if( (nFileRecv>0 || newPhantom) && db_exists("SELECT 1 FROM phantom") ){
3043
--- src/xfer.c
+++ src/xfer.c
@@ -206,11 +206,17 @@
206 blob_reset(&src);
207 blob_reset(&content);
208 return;
209 }
210 pXfer->nDeltaRcvd++;
211 if( blob_delta_apply(&src, &content, &next)<0 ){
212 blob_appendf(&pXfer->err, "invalid delta on received artifact: %b",
213 pUuid);
214 blob_reset(&src);
215 blob_reset(&content);
216 return;
217 }
218 blob_reset(&src);
219 blob_reset(&content);
220 content = next;
221 }else{
222 pXfer->nFileRcvd++;
@@ -250,16 +256,21 @@
256 **
257 ** The original size of the HASH artifact is USIZE.
258 **
259 ** If any error occurs, write a message into pErr which has already
260 ** be initialized to an empty string.
261 **
262 ** Unless cloneFlag is set, the content must have the size USIZE and
263 ** give the HASH, or it is refused. The hash of a delta is checked only
264 ** if DELTASRC is at hand. A clone is not checked here.
265 **
266 ** Any artifact successfully received by this routine is considered to
267 ** be public and is therefore removed from the "private" table.
268 */
269 static void xfer_accept_compressed_file(
270 Xfer *pXfer,
271 int cloneFlag,
272 char **pzUuidList,
273 int *pnUuidList
274 ){
275 int szC; /* CSIZE */
276 int szU; /* USIZE */
@@ -293,20 +304,60 @@
304 }
305 if( uuid_is_shunned(blob_str(&pXfer->aToken[1])) ){
306 /* Ignore files that have been shunned */
307 blob_reset(&content);
308 return;
309 }
310 if( szU==0
311 && (blob_size(&content)<=4 || blob_uncompress(&content, &content))
312 ){
313 blob_appendf(&pXfer->err, "malformed cfile content");
314 blob_reset(&content);
315 return;
316 }
317 if( pXfer->nToken==5 ){
318 srcid = rid_from_uuid(&pXfer->aToken[2], 1, isPriv);
319 pXfer->nDeltaRcvd++;
320 }else{
321 srcid = 0;
322 pXfer->nFileRcvd++;
323 }
324 if( !cloneFlag ){
325 Blob *pUuid = &pXfer->aToken[1];
326 Blob x; /* The content, uncompressed */
327 Blob src, next; /* Source of a delta, and the delta applied to it */
328 int ok = 1;
329 blob_zero(&x);
330 if( szU==0 ){
331 blob_copy(&x, &content);
332 }else if( blob_size(&content)<=4 || blob_uncompress(&content, &x) ){
333 blob_appendf(&pXfer->err, "malformed cfile content");
334 blob_reset(&content);
335 return;
336 }
337 if( srcid==0 ){
338 ok = (int)blob_size(&x)==szU
339 && hname_verify_hash(&x, blob_buffer(pUuid), blob_size(pUuid));
340 }else if( delta_output_size(blob_buffer(&x), blob_size(&x))!=szU ){
341 ok = 0;
342 }else if( content_get(srcid, &src) ){
343 blob_zero(&next);
344 ok = blob_delta_apply(&src, &x, &next)>=0
345 && hname_verify_hash(&next, blob_buffer(pUuid), blob_size(pUuid));
346 blob_reset(&next);
347 blob_reset(&src);
348 }
349 blob_reset(&x);
350 if( !ok ){
351 blob_appendf(&pXfer->err,
352 "wrong size or hash on received artifact: %b", pUuid);
353 blob_reset(&content);
354 return;
355 }
356 }
357 rid = content_put_ex(&content, blob_str(&pXfer->aToken[1]), srcid,
358 szU, isPriv);
359 Th_AppendToList(pzUuidList, pnUuidList, blob_str(&pXfer->aToken[1]),
360 blob_size(&pXfer->aToken[1]));
361 remote_has(rid);
362 blob_reset(&content);
363 }
@@ -375,10 +426,13 @@
426 goto end_accept_unversioned_file;
427 }
428
429 /* Make sure we have a valid g.rcvid marker */
430 content_rcvid_init(0);
431
432 /* The table might not exist yet if the other side sent no uv-hash pragma */
433 unversioned_schema();
434
435 /* Check to see if current content really should be overwritten. Ideally,
436 ** a uvfile card should never have been sent unless the overwrite should
437 ** occur. But do not trust the sender. Double-check.
438 */
@@ -731,10 +785,11 @@
785 int isClient /* True if sending from client to server */
786 ){
787 Stmt q1;
788 int isFull = !isClient && (int)blob_size(pXfer->pOut)>=pXfer->mxSend;
789
790 unversioned_schema();
791 if( isFull ) noContent = 1;
792 if( noContent ){
793 db_prepare(&q1,
794 "SELECT mtime, hash, encoding, sz FROM unversioned WHERE name=%Q",
795 zName
@@ -1409,11 +1464,11 @@
1464 cgi_reset_content();
1465 @ error not\sauthorized\sto\swrite%s(whyNotAuth())
1466 nErr++;
1467 break;
1468 }
1469 xfer_accept_compressed_file(&xfer, 0, pzUuidList, pnUuidList);
1470 if( blob_size(&xfer.err) ){
1471 cgi_reset_content();
1472 @ error %T(blob_str(&xfer.err))
1473 nErr++;
1474 break;
@@ -2091,10 +2146,22 @@
2146 ** Floating-point absolute value
2147 */
2148 static double fossil_fabs(double x){
2149 return x>0.0 ? x : -x;
2150 }
2151
2152 /*
2153 ** Tell the user that unversioned content cannot be pushed because the
2154 ** server has sent the "uv-pull-only" pragma.
2155 */
2156 static void uv_pull_only_warning(void){
2157 fossil_warning(
2158 "Warning: uv-pull-only \n"
2159 " Unable to push unversioned content because you lack\n"
2160 " sufficient permission on the server\n"
2161 );
2162 }
2163
2164 /*
2165 ** Sync to the host identified in g.url.name and g.url.path. This
2166 ** routine is called by the client.
2167 **
@@ -2170,14 +2237,13 @@
2237 const char *zPX;
2238 configRcvMask = 0;
2239 configSendMask = 0;
2240 syncFlags &= ~(SYNC_PUSH);
2241 zPX = db_get("parent-project-code", 0);
2242 if( zPX==0 ){
2243 fossil_fatal("there is no parent project: set the 'parent-project-code'"
2244 " config parameter in order to pull from a parent project");
 
2245 }
2246 if( zPX ){
2247 zAltPCode = zPX;
2248 }
2249 }
@@ -2578,11 +2644,11 @@
2644 ** Client receives a compressed file transmitted from the server.
2645 */
2646 if( blob_eq(&xfer.aToken[0],"cfile")
2647 && (syncFlags & (SYNC_PULL|SYNC_CLONE))!=0
2648 ){
2649 xfer_accept_compressed_file(&xfer, (syncFlags & SYNC_CLONE)!=0, 0, 0);
2650 nArtifactRcvd++;
2651 }else
2652
2653 /* uvfile NAME MTIME HASH SIZE FLAGS \n CONTENT
2654 **
@@ -2725,15 +2791,11 @@
2791 "UPDATE unversioned SET mtime=%lld WHERE name=%Q", mtime, zName
2792 );
2793 db_unset("uv-hash", 0);
2794 }
2795 if( iStatus>=4 && uvPullOnly==1 ){
2796 uv_pull_only_warning();
 
 
 
 
2797 uvPullOnly = 2;
2798 }
2799 if( iStatus<=3 || uvPullOnly ){
2800 db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
2801 }else if( iStatus==4 ){
@@ -3033,10 +3095,19 @@
3095 }
3096 }
3097 nUncRcvd += blob_size(&recv);
3098 blob_reset(&recv);
3099 nCycle++;
3100
3101 /* Also warn for files that no uvigot card named */
3102 if( uvPullOnly==1 && (syncFlags & SYNC_UV_REVERT)==0
3103 && db_exists("SELECT 1 FROM uv_tosend")
3104 ){
3105 uv_pull_only_warning();
3106 uvPullOnly = 2;
3107 db_multi_exec("DELETE FROM uv_tosend");
3108 }
3109
3110 /* Set go to 1 if we need to continue the sync/push/pull/clone for
3111 ** another round. Set go to 0 if it is time to quit. */
3112 nFileRecv = xfer.nFileRcvd + xfer.nDeltaRcvd + xfer.nDanglingFile;
3113 if( (nFileRecv>0 || newPhantom) && db_exists("SELECT 1 FROM phantom") ){
3114
+2 -2
--- src/zip.c
+++ src/zip.c
@@ -984,21 +984,21 @@
984984
**
985985
** r=TAG TAG identifies the check-in that is turned into an
986986
** SQL or ZIP archive. The default value is the name
987987
** of the main branch (usually "trunk").
988988
** If r= is omitted and if the name= query parameter
989
-** contains one "/" character then the of part the
989
+** contains one "/" character then the part of the
990990
** name= value before the / becomes the TAG and the
991991
** part of the name= value after the / is the download
992992
** filename. If no check-in is specified by either
993993
** name= or r=, then the name of the main branch
994994
** (usually "trunk") is used.
995995
**
996996
** in=PATTERN Only include files that match the comma-separated
997997
** list of GLOB patterns in PATTERN, as with ex=
998998
**
999
-** ex=PATTERN Omit any file that match PATTERN. PATTERN is a
999
+** ex=PATTERN Omit any file that matches PATTERN. PATTERN is a
10001000
** comma-separated list of GLOB patterns, where each
10011001
** pattern can optionally be quoted using ".." or '..'.
10021002
** Any file matching both ex= and in= is excluded.
10031003
**
10041004
** Robot Defenses:
10051005
--- src/zip.c
+++ src/zip.c
@@ -984,21 +984,21 @@
984 **
985 ** r=TAG TAG identifies the check-in that is turned into an
986 ** SQL or ZIP archive. The default value is the name
987 ** of the main branch (usually "trunk").
988 ** If r= is omitted and if the name= query parameter
989 ** contains one "/" character then the of part the
990 ** name= value before the / becomes the TAG and the
991 ** part of the name= value after the / is the download
992 ** filename. If no check-in is specified by either
993 ** name= or r=, then the name of the main branch
994 ** (usually "trunk") is used.
995 **
996 ** in=PATTERN Only include files that match the comma-separated
997 ** list of GLOB patterns in PATTERN, as with ex=
998 **
999 ** ex=PATTERN Omit any file that match PATTERN. PATTERN is a
1000 ** comma-separated list of GLOB patterns, where each
1001 ** pattern can optionally be quoted using ".." or '..'.
1002 ** Any file matching both ex= and in= is excluded.
1003 **
1004 ** Robot Defenses:
1005
--- src/zip.c
+++ src/zip.c
@@ -984,21 +984,21 @@
984 **
985 ** r=TAG TAG identifies the check-in that is turned into an
986 ** SQL or ZIP archive. The default value is the name
987 ** of the main branch (usually "trunk").
988 ** If r= is omitted and if the name= query parameter
989 ** contains one "/" character then the part of the
990 ** name= value before the / becomes the TAG and the
991 ** part of the name= value after the / is the download
992 ** filename. If no check-in is specified by either
993 ** name= or r=, then the name of the main branch
994 ** (usually "trunk") is used.
995 **
996 ** in=PATTERN Only include files that match the comma-separated
997 ** list of GLOB patterns in PATTERN, as with ex=
998 **
999 ** ex=PATTERN Omit any file that matches PATTERN. PATTERN is a
1000 ** comma-separated list of GLOB patterns, where each
1001 ** pattern can optionally be quoted using ".." or '..'.
1002 ** Any file matching both ex= and in= is excluded.
1003 **
1004 ** Robot Defenses:
1005
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -596,10 +596,20 @@
596596
$(SRCDIR)/../skins/original/header.txt \
597597
$(SRCDIR)/../skins/plain_gray/css.txt \
598598
$(SRCDIR)/../skins/plain_gray/details.txt \
599599
$(SRCDIR)/../skins/plain_gray/footer.txt \
600600
$(SRCDIR)/../skins/plain_gray/header.txt \
601
+ $(SRCDIR)/../skins/refined-dark/css.txt \
602
+ $(SRCDIR)/../skins/refined-dark/details.txt \
603
+ $(SRCDIR)/../skins/refined-dark/footer.txt \
604
+ $(SRCDIR)/../skins/refined-dark/header.txt \
605
+ $(SRCDIR)/../skins/refined-dark/js.txt \
606
+ $(SRCDIR)/../skins/refined-light/css.txt \
607
+ $(SRCDIR)/../skins/refined-light/details.txt \
608
+ $(SRCDIR)/../skins/refined-light/footer.txt \
609
+ $(SRCDIR)/../skins/refined-light/header.txt \
610
+ $(SRCDIR)/../skins/refined-light/js.txt \
601611
$(SRCDIR)/../skins/xekri/css.txt \
602612
$(SRCDIR)/../skins/xekri/details.txt \
603613
$(SRCDIR)/../skins/xekri/footer.txt \
604614
$(SRCDIR)/../skins/xekri/header.txt \
605615
$(SRCDIR)/alerts/bflat2.wav \
606616
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -596,10 +596,20 @@
596 $(SRCDIR)/../skins/original/header.txt \
597 $(SRCDIR)/../skins/plain_gray/css.txt \
598 $(SRCDIR)/../skins/plain_gray/details.txt \
599 $(SRCDIR)/../skins/plain_gray/footer.txt \
600 $(SRCDIR)/../skins/plain_gray/header.txt \
 
 
 
 
 
 
 
 
 
 
601 $(SRCDIR)/../skins/xekri/css.txt \
602 $(SRCDIR)/../skins/xekri/details.txt \
603 $(SRCDIR)/../skins/xekri/footer.txt \
604 $(SRCDIR)/../skins/xekri/header.txt \
605 $(SRCDIR)/alerts/bflat2.wav \
606
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -596,10 +596,20 @@
596 $(SRCDIR)/../skins/original/header.txt \
597 $(SRCDIR)/../skins/plain_gray/css.txt \
598 $(SRCDIR)/../skins/plain_gray/details.txt \
599 $(SRCDIR)/../skins/plain_gray/footer.txt \
600 $(SRCDIR)/../skins/plain_gray/header.txt \
601 $(SRCDIR)/../skins/refined-dark/css.txt \
602 $(SRCDIR)/../skins/refined-dark/details.txt \
603 $(SRCDIR)/../skins/refined-dark/footer.txt \
604 $(SRCDIR)/../skins/refined-dark/header.txt \
605 $(SRCDIR)/../skins/refined-dark/js.txt \
606 $(SRCDIR)/../skins/refined-light/css.txt \
607 $(SRCDIR)/../skins/refined-light/details.txt \
608 $(SRCDIR)/../skins/refined-light/footer.txt \
609 $(SRCDIR)/../skins/refined-light/header.txt \
610 $(SRCDIR)/../skins/refined-light/js.txt \
611 $(SRCDIR)/../skins/xekri/css.txt \
612 $(SRCDIR)/../skins/xekri/details.txt \
613 $(SRCDIR)/../skins/xekri/footer.txt \
614 $(SRCDIR)/../skins/xekri/header.txt \
615 $(SRCDIR)/alerts/bflat2.wav \
616
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -561,10 +561,20 @@
561561
"$(SRCDIR)\..\skins\original\header.txt" \
562562
"$(SRCDIR)\..\skins\plain_gray\css.txt" \
563563
"$(SRCDIR)\..\skins\plain_gray\details.txt" \
564564
"$(SRCDIR)\..\skins\plain_gray\footer.txt" \
565565
"$(SRCDIR)\..\skins\plain_gray\header.txt" \
566
+ "$(SRCDIR)\..\skins\refined-dark\css.txt" \
567
+ "$(SRCDIR)\..\skins\refined-dark\details.txt" \
568
+ "$(SRCDIR)\..\skins\refined-dark\footer.txt" \
569
+ "$(SRCDIR)\..\skins\refined-dark\header.txt" \
570
+ "$(SRCDIR)\..\skins\refined-dark\js.txt" \
571
+ "$(SRCDIR)\..\skins\refined-light\css.txt" \
572
+ "$(SRCDIR)\..\skins\refined-light\details.txt" \
573
+ "$(SRCDIR)\..\skins\refined-light\footer.txt" \
574
+ "$(SRCDIR)\..\skins\refined-light\header.txt" \
575
+ "$(SRCDIR)\..\skins\refined-light\js.txt" \
566576
"$(SRCDIR)\..\skins\xekri\css.txt" \
567577
"$(SRCDIR)\..\skins\xekri\details.txt" \
568578
"$(SRCDIR)\..\skins\xekri\footer.txt" \
569579
"$(SRCDIR)\..\skins\xekri\header.txt" \
570580
"$(SRCDIR)\alerts\bflat2.wav" \
@@ -1200,10 +1210,20 @@
12001210
echo "$(SRCDIR)\../skins/original/header.txt" >> $@
12011211
echo "$(SRCDIR)\../skins/plain_gray/css.txt" >> $@
12021212
echo "$(SRCDIR)\../skins/plain_gray/details.txt" >> $@
12031213
echo "$(SRCDIR)\../skins/plain_gray/footer.txt" >> $@
12041214
echo "$(SRCDIR)\../skins/plain_gray/header.txt" >> $@
1215
+ echo "$(SRCDIR)\../skins/refined-dark/css.txt" >> $@
1216
+ echo "$(SRCDIR)\../skins/refined-dark/details.txt" >> $@
1217
+ echo "$(SRCDIR)\../skins/refined-dark/footer.txt" >> $@
1218
+ echo "$(SRCDIR)\../skins/refined-dark/header.txt" >> $@
1219
+ echo "$(SRCDIR)\../skins/refined-dark/js.txt" >> $@
1220
+ echo "$(SRCDIR)\../skins/refined-light/css.txt" >> $@
1221
+ echo "$(SRCDIR)\../skins/refined-light/details.txt" >> $@
1222
+ echo "$(SRCDIR)\../skins/refined-light/footer.txt" >> $@
1223
+ echo "$(SRCDIR)\../skins/refined-light/header.txt" >> $@
1224
+ echo "$(SRCDIR)\../skins/refined-light/js.txt" >> $@
12051225
echo "$(SRCDIR)\../skins/xekri/css.txt" >> $@
12061226
echo "$(SRCDIR)\../skins/xekri/details.txt" >> $@
12071227
echo "$(SRCDIR)\../skins/xekri/footer.txt" >> $@
12081228
echo "$(SRCDIR)\../skins/xekri/header.txt" >> $@
12091229
echo "$(SRCDIR)\alerts/bflat2.wav" >> $@
12101230
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -561,10 +561,20 @@
561 "$(SRCDIR)\..\skins\original\header.txt" \
562 "$(SRCDIR)\..\skins\plain_gray\css.txt" \
563 "$(SRCDIR)\..\skins\plain_gray\details.txt" \
564 "$(SRCDIR)\..\skins\plain_gray\footer.txt" \
565 "$(SRCDIR)\..\skins\plain_gray\header.txt" \
 
 
 
 
 
 
 
 
 
 
566 "$(SRCDIR)\..\skins\xekri\css.txt" \
567 "$(SRCDIR)\..\skins\xekri\details.txt" \
568 "$(SRCDIR)\..\skins\xekri\footer.txt" \
569 "$(SRCDIR)\..\skins\xekri\header.txt" \
570 "$(SRCDIR)\alerts\bflat2.wav" \
@@ -1200,10 +1210,20 @@
1200 echo "$(SRCDIR)\../skins/original/header.txt" >> $@
1201 echo "$(SRCDIR)\../skins/plain_gray/css.txt" >> $@
1202 echo "$(SRCDIR)\../skins/plain_gray/details.txt" >> $@
1203 echo "$(SRCDIR)\../skins/plain_gray/footer.txt" >> $@
1204 echo "$(SRCDIR)\../skins/plain_gray/header.txt" >> $@
 
 
 
 
 
 
 
 
 
 
1205 echo "$(SRCDIR)\../skins/xekri/css.txt" >> $@
1206 echo "$(SRCDIR)\../skins/xekri/details.txt" >> $@
1207 echo "$(SRCDIR)\../skins/xekri/footer.txt" >> $@
1208 echo "$(SRCDIR)\../skins/xekri/header.txt" >> $@
1209 echo "$(SRCDIR)\alerts/bflat2.wav" >> $@
1210
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -561,10 +561,20 @@
561 "$(SRCDIR)\..\skins\original\header.txt" \
562 "$(SRCDIR)\..\skins\plain_gray\css.txt" \
563 "$(SRCDIR)\..\skins\plain_gray\details.txt" \
564 "$(SRCDIR)\..\skins\plain_gray\footer.txt" \
565 "$(SRCDIR)\..\skins\plain_gray\header.txt" \
566 "$(SRCDIR)\..\skins\refined-dark\css.txt" \
567 "$(SRCDIR)\..\skins\refined-dark\details.txt" \
568 "$(SRCDIR)\..\skins\refined-dark\footer.txt" \
569 "$(SRCDIR)\..\skins\refined-dark\header.txt" \
570 "$(SRCDIR)\..\skins\refined-dark\js.txt" \
571 "$(SRCDIR)\..\skins\refined-light\css.txt" \
572 "$(SRCDIR)\..\skins\refined-light\details.txt" \
573 "$(SRCDIR)\..\skins\refined-light\footer.txt" \
574 "$(SRCDIR)\..\skins\refined-light\header.txt" \
575 "$(SRCDIR)\..\skins\refined-light\js.txt" \
576 "$(SRCDIR)\..\skins\xekri\css.txt" \
577 "$(SRCDIR)\..\skins\xekri\details.txt" \
578 "$(SRCDIR)\..\skins\xekri\footer.txt" \
579 "$(SRCDIR)\..\skins\xekri\header.txt" \
580 "$(SRCDIR)\alerts\bflat2.wav" \
@@ -1200,10 +1210,20 @@
1210 echo "$(SRCDIR)\../skins/original/header.txt" >> $@
1211 echo "$(SRCDIR)\../skins/plain_gray/css.txt" >> $@
1212 echo "$(SRCDIR)\../skins/plain_gray/details.txt" >> $@
1213 echo "$(SRCDIR)\../skins/plain_gray/footer.txt" >> $@
1214 echo "$(SRCDIR)\../skins/plain_gray/header.txt" >> $@
1215 echo "$(SRCDIR)\../skins/refined-dark/css.txt" >> $@
1216 echo "$(SRCDIR)\../skins/refined-dark/details.txt" >> $@
1217 echo "$(SRCDIR)\../skins/refined-dark/footer.txt" >> $@
1218 echo "$(SRCDIR)\../skins/refined-dark/header.txt" >> $@
1219 echo "$(SRCDIR)\../skins/refined-dark/js.txt" >> $@
1220 echo "$(SRCDIR)\../skins/refined-light/css.txt" >> $@
1221 echo "$(SRCDIR)\../skins/refined-light/details.txt" >> $@
1222 echo "$(SRCDIR)\../skins/refined-light/footer.txt" >> $@
1223 echo "$(SRCDIR)\../skins/refined-light/header.txt" >> $@
1224 echo "$(SRCDIR)\../skins/refined-light/js.txt" >> $@
1225 echo "$(SRCDIR)\../skins/xekri/css.txt" >> $@
1226 echo "$(SRCDIR)\../skins/xekri/details.txt" >> $@
1227 echo "$(SRCDIR)\../skins/xekri/footer.txt" >> $@
1228 echo "$(SRCDIR)\../skins/xekri/header.txt" >> $@
1229 echo "$(SRCDIR)\alerts/bflat2.wav" >> $@
1230

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button