/* (Taken from morpview as at 2018-04-04.) */ body{ margin:10px!important; text-align:justify!important; hyphens:auto !important; widows: 2; } body, .toc, .mw-body h1, .my-body h2, .mw-body-content h1, .mw-body-content h2 { /* Baskerville has in its favour its similarity to Computer Modern, which * might work to give it an academic feel (albeit in a "I don't care about * appearance" way). It might also mix well with TeX-rendered maths on * wikipedia. The so-called modern look does feel a bit magaziney, for * better or worse. * * Crimson Text is plain but seems workable from a quick look. * * Given the dumb quotes, maybe I should consider an actual sans. * * Source Serif is modern (leaning towards bland). Has companion Source * Sans. The pair feel more like web fonts than print, but perhaps that's * appropriate for Wikipedia. Open counters help for screen use. */ /*font-family:New Baskerville FS,serif!important;*/ /*font-family:"Crimson Text",serif!important;*/ /*font-family:"Equity Text A",serif!important;*/ /*font-family:"Adobe Garamond Pro",serif!important;*/ /*font-family:"Adobe Caslon Pro",serif!important;*/ /*font-family:"Minion Pro",serif!important;*/ font-family: "Source Serif Pro", "Noto Serif Gurmukhi", serif, sans-serif !important; } @font-face { font-family: sans-serif; src: prince-lookup("Droid Sans Fallback"); } @font-face { font-family: sans-serif; src: prince-lookup("Noto Sans Gurmukhi"); } @font-face { font-family: sans-serif; src: prince-lookup("IPAmjMincho"); } @font-face { font-family: sans-serif; src: prince-lookup("Source Sans Pro"); } h1,h2,h3,h4,h5,h6,tr{ text-align:left!important; text-align:start!important; } h1,h2,h3,h4,h5,h6{ break-inside: avoid !important; break-after: avoid !important; page-break-inside: avoid !important; page-break-after: avoid !important; /* For some reason, wikipedia styling has page-break-before:avoid. */ page-break-before: auto !important; } .toc,#toc { /* wikipedia styling for some reason forbids breaking before & after the ToC table. */ page-break-after: auto !important; page-break-before: auto !important; } /* load.php has a p:before rule to add a block-level 120pt-wide zero-height block, * perhaps to force a para to clear far enough that the measure is at least 10em. * * It unfortunately defeats h1{break-after:avoid}. * * Some sections start with a paragraph containing only an anchor span. This * is a bit hard to match, because it doesn't match :empty (because it contains * an element), and :only-child is insufficient because it only considers * element children, so p:has(>:only-child) still matches ‘

Lots * of text.

’ We check for "e" as a partial fix, but of course this will * break for e.g. non-latin Wikipedia pages. */ :matches(h1,h2,h3,h4,h5,h6)+p::before, :matches(h1,h2,h3,h4,h5,h6)+:matches(link,style)+div[role='note']+p::before, :matches(h1,h2,h3,h4,h5,h6)+p:has(>span.anchor:empty:only-child):not(:contains("e"))+:matches(link,style)+div[role='note']+p::before, :matches(h1,h2,h3,h4,h5,h6)+p:has(>span.anchor:empty:only-child):not(:contains("e")) { break-after: avoid; } #toc li>a:first-child+ul { break-before: avoid; /* -prince-weakly-avoid */ /* (Once we do have a weaker form of avoidance, it would be worth expending * some cost to avoid breaking immediately before a ul. Until then, toc is * safer than most parts of a document to use this blunt break-before:avoid * directive: e.g. it's more acceptable for toc pages to run short than * elsewhere in a document.) */ } /* .gallerytext: * This content can benefit from the straight edges of justified text, * similar to multi-column content. A difficulty, however, is that * .gallerytext is very narrow. If a line contains only a single word, * then at least that paragraph may well be better off completely * unjustified. Even with font-size:75% and using a narrow font, * the justification is too challenging. * Here I've retained the narrow font even with ragged end, as even * ragged-end has difficulties, appearing excessively ragged in this * narrow measure. * * Another difficulty is that the different font can simply look out of * place if there are only a small number of gallery items. * 2013-07-30: I'm now dropping the font family change, though * retaining the size change for now. */ .gallerytext{ font-size:75%; text-align:start; } .gallerybox { text-align: start; } /* References list, Bibliography, Further Reading: * * A reference list has many one-line paragraphs (which are narrower than * the measure), to the extent that one can barely see what the two-line * paragraphs are trying to equal in their length. So they have the cost * of looseness and of a bit more phrase breaking than occurs with ragged * setting. * * I'd like to use some property that says to tolerate more raggedness * (line shortness) when this allows breaking at a natural place such as a * sentence boundary, colon, comma, or edge of inline element such as the * used for titles. However, the "sentence" part of this might well * need to be delayed until we have better sentence segmentation, to avoid * unfortunate breaks like "Vol.//30". * * This "text-align:start" styling might not be necessary if we ever * implement a heuristic that suppresses justification when there are too * few lines that the line ends are actually lining up with. */ .references-column-width, .mw-references-columns, .references, #Further_reading+ul { text-align:start; } /* Unfortunately, some wikipedia styling as at 2021-01 uses * absolute font sizes, so I'll drop this font-size increase, * and will instead rely on magnification. (* 22px for typical serif fonts (including Georgia), * whereas 18px is big enough for sans-serif. *) html,body,#globalWrapper{font-size:25px!important} (* I'm bumping this to 25px to see if it helps me keep further from the monitor * and less distracted by dust, scratches etc. on the monitor surface. * Font-size doesn't seem to be the sole determining factor in how far I find * comfortable from the monitor, but it's worth a try. *) */ p, div.excerpt /* div.excerpt ends in a para not marked up with p. */ {max-width:40em} li,dd,dt{max-width:36.8em} /* To make ul li line up, the right number is something like 38.3em. * (In particular, it isn't 40em - 40px = 38.1818...em.) * Whereas for ol li, 36.8em is fairly close. */ /* Again, 35.5em (at 100%), or the below 38.6em at 92%, is just a hack that looks about right. * (E.g. I'm not sure whether 38.6 or 38.7em looks better.) * The font-size of 92% is better than 90% (at least on river's display), * and is also I think better than 100%. */ blockquote{max-width:35.6em} #content{margin-left:0!important;margin-right:0!important} /* Weaken some over-enthusiastic li{break-inside:avoid} rules. */ :matches(.reflist-columns, .mw-references-columns) li { break-inside: auto !important; page-break-inside: auto !important; } li { orphans: 2; widows: 2; } li:has(ul,ol) { break-inside: auto !important; } /* Avoid break after th if its scope covers the following row. * * Rare bug: Our check for td ignores the possibility of rowspan. * * Very rare bug: We don't check whether the table is in a perpendicular * writing mode from that of the fragmentation container. */ tr:matches( :has(>th:matches([scope="col"],[scope="rowgroup"],[scope="colgroup"])), :has(>th:not([scope="row"])):not(:has(>td)) )+tr { break-before: avoid; } /* vi: set autoindent shiftwidth=4 tabstop=8 expandtab softtabstop=4 : */