Template:Mxt/User CSS for a monospaced coding font: Difference between revisions

Content deleted Content added
m tweak
trim out old classes
Line 6:
This code will do the following:
* Apply a consistent monospace font of your choice (and the fallback system-default {{samp|monospace}}, should that font go missing or not have characters you need) to all the normally monospaced HTML elements like {{tag|code|o}}, {{tag|pre|o}}, etc.
* Do the same for all the classes used by {{tlx|mxt}} and other monospaced templates in the {{tlx|xt}} family
* Do the same for additional site-wide classes (as identified so far, e.g. <code>.monospaced</code>) that output as monospace.
* Make the three most frequently encountered editing fields also use this font stack: the main editing window, the edit summary line, and the search entry box.
Line 16:
{{syntaxhighlight|lang=css|1=
/* 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; }