/* ==UserStyle== @name wikipedia.rehash [css] @namespace krasjet @homepageURL https://krasjet.com/voice/wikipedia.rehash/ @version 1.2.1 @description A minimal typographic rehash of Wikipedia designed for better screen readability. @license CC-BY-NC-4.0 @author krasjet ==/UserStyle== */ @-moz-document domain("wikipedia.org"), domain("wikibooks.org"), domain("mediawiki.org"), domain("wiktionary.org") { /* narrower body */ body { max-width: 68rem; margin-left: auto; margin-right: auto; position: relative; float: none; background-color: #fdfdfd; } /* remove the blue border on the left */ .mw-body { border-left: none; } /* navbar */ #mw-panel .portal { margin: 0 0.7rem 0 0.5rem; font-size: 1.1rem !important; } /* fix search box */ .suggestions { right: 16px !important; } .selector-left { left: 120px !important; } /* * larger font size and more space between lines * charter can be downloaded here: https://practicaltypography.com/fonts/charter.zip */ .mw-body-content { font-size: 1.3rem !important; line-height: 1.65; font-family: charter, serif; } /* hyphenation, only available on firefox, legacy edge, and safari */ .mw-body-content p { -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } /* CJK typefaces, remove this if you don't use CJK wikipedia */ .mw-body-content:lang(ja) { font-size: 1.25rem !important; font-family: charter, "Hiragino Mincho ProN", YuMincho, "Yu Mincho", "Noto Serif CJK JP", "Source Han Serif JP", "MS Mincho", HiraMinProN-W3, serif; } .mw-body-content:lang(zh) { font-size: 1.25rem !important; line-height: 1.7; font-family: charter, "Songti SC", "Songti TC", "Noto Serif CJK SC", "Noto Serif CJK TC", "Source Han Serif CN", "Source Han Serif SC", "Source Han Serif TC", NSimSun, SimSun, "LiSong Pro", PMingLiU, MingLiU, HiraMinProN-W3, serif; } .mw-body-content:lang(zh-Hans) { font-size: 1.25rem !important; line-height: 1.7; font-family: charter, "Songti SC", "Noto Serif CJK SC", "Source Han Serif CN", "Source Han Serif SC", NSimSun, SimSun, "LiSong Pro", PMingLiU, MingLiU, serif; } .mw-body-content:lang(zh-Hant) { font-size: 1.25rem !important; line-height: 1.7; font-family: charter, "Songti TC", "Noto Serif CJK TC", "Source Han Serif CN", "Source Han Serif TC", PMingLiU, STSong, "LiSong Pro", MingLiU, NSimSun, SimSun, serif; } /* less intrusive heading size */ #mw-content-text h2 { margin-top: 1.15rem; font-size: 120% !important; } /* slightly lower contrast */ .mw-body-content p { color: #222222; } #content { background-color: #fcfcfc; } /* remove the gradient of the banner */ #mw-page-base { background-color: #fdfdfd; background-image: none !important; } /* prevent math image overflow */ dd .mwe-math-fallback-image-inline { max-width: 100% !important; } /* fix the equation box issue */ .equation-box dd .mwe-math-fallback-image-inline { max-width: none !important; } /* fix numbered equations */ dd td { width: initial !important; } /* font size adjustments for various elements */ /* * I'm using Fira Mono as my monospace font. * You might have to tweak this part for your setup. */ pre, code, .monospaced { font-size: 75% !important; } .hatnote { font-size: 90% !important; } /* list items */ #mw-content-text ul, #mw-content-text ol { font-size: 96% !important; } table { font-size: 85% !important; /* uncomment this if you want to prevent table overflow */ /* display: block; overflow-x: auto; */ } table pre, table code, table .monospaced { font-size: 85% !important; } #toc { font-size: 90% !important; } #toc h2 { font-size: 100% !important; } #mp-topbanner { font-size: 80% !important; } .thumbcaption { font-size: 85% !important; } }