Fossil SCM

Removed the list of candidate monospace fonts to allow the browser's default for "font-family: monospace" to take effect even if one of those fonts is installed. This then removed the reason we collected all of the prior declarations, so scattered the one-off cases to be with the other definitions, but kept the generic cases together, if only so we can explain why we no longer have that long font list.

wyoung 2025-11-29 16:44 trunk
Commit 8f509a5787c5b8cee692fa5df63a84b1ae9b16b2466affbb1975a438dcdfca02
1 file changed +22 -19
+22 -19
--- src/default.css
+++ src/default.css
@@ -623,10 +623,11 @@
623623
tr.diffskip.jchunk:hover {
624624
/*background-color: rgba(127,127,127,0.5);
625625
cursor: pointer;*/
626626
}
627627
tr.diffskip > td.chunkctrl {
628
+ font-family: monospace;
628629
text-align: left;
629630
}
630631
tr.diffskip > td.chunkctrl > div {
631632
display: flex;
632633
align-items: center;
@@ -1373,19 +1374,20 @@
13731374
}
13741375
.flex-container.child-gap-small > * {
13751376
margin: 0.25em;
13761377
}
13771378
#fossil-status-bar {
1378
- display: block;
1379
- border-width: 1px;
1379
+ border-color: inherit;
13801380
border-style: inset;
1381
- border-color: inherit;
1382
- min-height: 1.5em;
1381
+ border-width: 1px;
1382
+ display: block;
1383
+ flex: 0 0 auto;
1384
+ font-family: monospace;
13831385
font-size: 1.2em;
1384
- padding: 0.2em;
13851386
margin: 0.25em 0;
1386
- flex: 0 0 auto;
1387
+ min-height: 1.5em;
1388
+ padding: 0.2em;
13871389
}
13881390
.font-size-80 {
13891391
font-size: 80%;
13901392
}
13911393
.font-size-100 {
@@ -1472,10 +1474,11 @@
14721474
table-layout: fixed /* required to keep ultra-wide code from exceeding
14731475
window width, and instead force a scrollbar
14741476
on them. */;
14751477
}
14761478
table.numbered-lines > tbody > tr {
1479
+ font-family: monospace;
14771480
line-height: 1.35;
14781481
white-space: pre;
14791482
}
14801483
table.numbered-lines > tbody > tr > td {
14811484
font-family: inherit;
@@ -1887,23 +1890,22 @@
18871890
}
18881891
body.branch .submenu > a.timeline-link.selected {
18891892
display: inline;
18901893
}
18911894
1892
-/* Candidate fonts for various forms of monospaced text. Collected here
1893
- * to avoid repeating this long list of fonts. */
1894
-code, kbd, pre, samp, tt, var,
1895
- div.markdown ol.footnotes > li.fn-joined > sup.fn-joined,
1896
- table.numbered-lines > tbody > tr,
1897
- tr.diffskip > td.chunkctrl,
1898
- #fossil-status-bar,
1899
- .monospace {
1900
- font-family: "Source Code Pro", "Menlo", "Monaco", "Consolas",
1901
- "Andale Mono", "Ubuntu Mono", "Deja Vu Sans Mono",
1902
- "Letter Gothic", "Letter Gothic Std", "Prestige Elite Std",
1903
- "Courier", "Courier New",
1904
- monospace;
1895
+/* Fossil's generated HTML marks monospaced text in many different ways.
1896
+ * We we take care of the generic tag cases here to avoid repeating the
1897
+ * stying. One-off cases are handled elsewhere.
1898
+ *
1899
+ * This used to list many candidate fonts deemed to look good, in
1900
+ * descending order of desirability, but that was because browsers
1901
+ * often defaulted to terrible choices. That is no longer the case,
1902
+ * so now we go generic to get a good-enough option by default, which
1903
+ * then allows the user to override it via their browser prefs.
1904
+ */
1905
+code, kbd, pre, samp, tt, var, .monospace {
1906
+ font-family: monospace;
19051907
}
19061908
19071909
div.markdown > ol.footnotes {
19081910
font-size: 90%;
19091911
}
@@ -1910,10 +1912,11 @@
19101912
div.markdown > ol.footnotes > li {
19111913
margin-bottom: 0.5em;
19121914
}
19131915
div.markdown ol.footnotes > li.fn-joined > sup.fn-joined {
19141916
color: gray;
1917
+ font-family: monospace;
19151918
}
19161919
div.markdown ol.footnotes > li.fn-joined > sup.fn-joined::after {
19171920
content: "(joined from multiple locations) ";
19181921
}
19191922
div.markdown ol.footnotes > li.fn-misreference {
19201923
--- src/default.css
+++ src/default.css
@@ -623,10 +623,11 @@
623 tr.diffskip.jchunk:hover {
624 /*background-color: rgba(127,127,127,0.5);
625 cursor: pointer;*/
626 }
627 tr.diffskip > td.chunkctrl {
 
628 text-align: left;
629 }
630 tr.diffskip > td.chunkctrl > div {
631 display: flex;
632 align-items: center;
@@ -1373,19 +1374,20 @@
1373 }
1374 .flex-container.child-gap-small > * {
1375 margin: 0.25em;
1376 }
1377 #fossil-status-bar {
1378 display: block;
1379 border-width: 1px;
1380 border-style: inset;
1381 border-color: inherit;
1382 min-height: 1.5em;
 
 
1383 font-size: 1.2em;
1384 padding: 0.2em;
1385 margin: 0.25em 0;
1386 flex: 0 0 auto;
 
1387 }
1388 .font-size-80 {
1389 font-size: 80%;
1390 }
1391 .font-size-100 {
@@ -1472,10 +1474,11 @@
1472 table-layout: fixed /* required to keep ultra-wide code from exceeding
1473 window width, and instead force a scrollbar
1474 on them. */;
1475 }
1476 table.numbered-lines > tbody > tr {
 
1477 line-height: 1.35;
1478 white-space: pre;
1479 }
1480 table.numbered-lines > tbody > tr > td {
1481 font-family: inherit;
@@ -1887,23 +1890,22 @@
1887 }
1888 body.branch .submenu > a.timeline-link.selected {
1889 display: inline;
1890 }
1891
1892 /* Candidate fonts for various forms of monospaced text. Collected here
1893 * to avoid repeating this long list of fonts. */
1894 code, kbd, pre, samp, tt, var,
1895 div.markdown ol.footnotes > li.fn-joined > sup.fn-joined,
1896 table.numbered-lines > tbody > tr,
1897 tr.diffskip > td.chunkctrl,
1898 #fossil-status-bar,
1899 .monospace {
1900 font-family: "Source Code Pro", "Menlo", "Monaco", "Consolas",
1901 "Andale Mono", "Ubuntu Mono", "Deja Vu Sans Mono",
1902 "Letter Gothic", "Letter Gothic Std", "Prestige Elite Std",
1903 "Courier", "Courier New",
1904 monospace;
1905 }
1906
1907 div.markdown > ol.footnotes {
1908 font-size: 90%;
1909 }
@@ -1910,10 +1912,11 @@
1910 div.markdown > ol.footnotes > li {
1911 margin-bottom: 0.5em;
1912 }
1913 div.markdown ol.footnotes > li.fn-joined > sup.fn-joined {
1914 color: gray;
 
1915 }
1916 div.markdown ol.footnotes > li.fn-joined > sup.fn-joined::after {
1917 content: "(joined from multiple locations) ";
1918 }
1919 div.markdown ol.footnotes > li.fn-misreference {
1920
--- src/default.css
+++ src/default.css
@@ -623,10 +623,11 @@
623 tr.diffskip.jchunk:hover {
624 /*background-color: rgba(127,127,127,0.5);
625 cursor: pointer;*/
626 }
627 tr.diffskip > td.chunkctrl {
628 font-family: monospace;
629 text-align: left;
630 }
631 tr.diffskip > td.chunkctrl > div {
632 display: flex;
633 align-items: center;
@@ -1373,19 +1374,20 @@
1374 }
1375 .flex-container.child-gap-small > * {
1376 margin: 0.25em;
1377 }
1378 #fossil-status-bar {
1379 border-color: inherit;
 
1380 border-style: inset;
1381 border-width: 1px;
1382 display: block;
1383 flex: 0 0 auto;
1384 font-family: monospace;
1385 font-size: 1.2em;
 
1386 margin: 0.25em 0;
1387 min-height: 1.5em;
1388 padding: 0.2em;
1389 }
1390 .font-size-80 {
1391 font-size: 80%;
1392 }
1393 .font-size-100 {
@@ -1472,10 +1474,11 @@
1474 table-layout: fixed /* required to keep ultra-wide code from exceeding
1475 window width, and instead force a scrollbar
1476 on them. */;
1477 }
1478 table.numbered-lines > tbody > tr {
1479 font-family: monospace;
1480 line-height: 1.35;
1481 white-space: pre;
1482 }
1483 table.numbered-lines > tbody > tr > td {
1484 font-family: inherit;
@@ -1887,23 +1890,22 @@
1890 }
1891 body.branch .submenu > a.timeline-link.selected {
1892 display: inline;
1893 }
1894
1895 /* Fossil's generated HTML marks monospaced text in many different ways.
1896 * We we take care of the generic tag cases here to avoid repeating the
1897 * stying. One-off cases are handled elsewhere.
1898 *
1899 * This used to list many candidate fonts deemed to look good, in
1900 * descending order of desirability, but that was because browsers
1901 * often defaulted to terrible choices. That is no longer the case,
1902 * so now we go generic to get a good-enough option by default, which
1903 * then allows the user to override it via their browser prefs.
1904 */
1905 code, kbd, pre, samp, tt, var, .monospace {
1906 font-family: monospace;
 
1907 }
1908
1909 div.markdown > ol.footnotes {
1910 font-size: 90%;
1911 }
@@ -1910,10 +1912,11 @@
1912 div.markdown > ol.footnotes > li {
1913 margin-bottom: 0.5em;
1914 }
1915 div.markdown ol.footnotes > li.fn-joined > sup.fn-joined {
1916 color: gray;
1917 font-family: monospace;
1918 }
1919 div.markdown ol.footnotes > li.fn-joined > sup.fn-joined::after {
1920 content: "(joined from multiple locations) ";
1921 }
1922 div.markdown ol.footnotes > li.fn-misreference {
1923

Keyboard Shortcuts

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