Template:Mxt/User CSS for a monospaced coding font

You can consistently use a monospaced font with well-designed characters for coding (e.g., to distinguish clearly between,  , and  , and between   and  ).

Add something like one of the code snippets below into your Special:MyPage/common.css page, replacing "Roboto Mono" with whatever your preferred coding font is (Roboto Mono was picked as a freely-available coding font for this example).

If you don't want to manually add this code to your CSS page but would rather  (transclude) it, see meta:User:SMcCandlish/codefont.css for quick instructions.

This code will do the following:
 * Apply a consistent monospace font of your choice (and the fallback system-default monospace, should that font go missing or not have characters you need) to all the normally monospaced HTML elements like, , etc.
 * Do the same for the classes used by and other monospaced templates in the  family
 * Do the same for additional site-wide classes (as identified so far, e.g. ) 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.

If you know of an additional class to add here, please update this page or mention it on the talk page.

Horizontal style undefined

Vertical style undefined

Cleanup efforts

If you'd like to help clean up instances of the  element – which has not been valid HTML since the 1990s, and should usually be replaced with  (this may vary by context) – you can add something like the following to your common.css to make stick out like a sore thumb:

undefined

You can also do this with, , , and other deprecated elements. For CSS you can just import for this, see meta:User:SMcCandlish/lint.css. {{Documentation|content=This is a documentation snippet page transcluded (without the banner or this doc section) into other template documentation for consistency. It takes no parameters.

Typical usage:

User CSS for a monospaced coding font
It can also be used as a stand-alone how-to page; a redirect to it, Help:User CSS for a monospaced coding font, is categorized as such. It is also transcluded as a section, at Help:User style.

}}