Jump to content

User:SMcCandlish/codefont.css

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Uses a good, free coding font, for user-editable material on the wiki.
   The Roboto Mono font used herein can be found here:
     https://github.com/google/fonts/tree/master/apache/robotomono
   To use this in your own user CSS, you can copy and adapt this to your
   Special:MyPage/common.css or meta:Special:MyPage/global.css.
   If you like it as-is, you can simply @import (transclude) it by putting
   the following at the TOP of either of those user CSS pages:
     @import url("https://meta.wikimedia.org/w/index.php?title=User:SMcCandlish/codefont.css&action=raw&bcache=1&maxage=86400&ctype=text/css");
   including the trailing ";". All @import directives must come before other
   CSS directives.  If you don't like your system-default monospace font,
   you will need to install Roboto Mono, or customize this code to use another.
*/

/* Use my font, when available, for code */
code, pre, samp, kbd, tt, .example-mono, .bad-example-mono, .neutral-example-mono, .deprecated-example-mono, .userlinks-username, .monospaced, .keyboard-key, .button, .plaincode {
	font-family: "Roboto Mono", monospace !important;
}
/*  Make some of the editable stuff monospaced */
#wpTextbox1, #wpSummary, #searchInput, #searchText {
	font-family: "Roboto Mono", monospace !important;
}

/* For <pre> sections, use scroll bar instead of ugly cutoff/overlap in Firefox */
pre { overflow: auto; }

/* Use browser prefs for overall text size and font */
html, body, #globalWrapper { font: inherit !important; }