Style Sheets

MemoWiki generally assumes default HTML formatting for the HTML generated from .wiki files. Some style modifications are applied by default, however:

The default style settings used are copied from memowiki.css.

If a user style sheet is specified (see below) it is linked after the default style settings so that any default style can be overridden.

User Style Sheets

A style sheet may be specified for a topic using the Change topic settings page. The style sheet named refers to an uploaded file (that is, a file in the /files directory of the topic). If only a name is specified then the extension .css is added. If the file is not present then the style sheet setting is ignored and the default styling is used, as described above.

For convenience, the standard header and footer bracket the HTML generated from the .wiki file with

  <div class=memowiki>

so that (for example) the default font colour and face can be changed with a style sheet entry such as:

  div.memowiki {
    color: blue;
    font-family: sans-serif;

In general, do not specify style for the <body> tag when the standard header and footer are used; of course with a snapshot private header and footer any approach may be used.

Restriction: at present, image thumbnails’ appearance is ‘hard coded’ and their markup and style cannot be overridden.

Private headers

When a private header is used it completely replaces the default header provided by MemoWiki, including the default styles used for hanging paragraphs, etc. Therefore the header should usually include (or link to) some or all the content of the MemoWiki style sheet (memowiki.css); a copy of this is added at the top level of the snapshot automatically, and can be accessed using, for example:

  <link rel="stylesheet" type="text/css" href="memowiki.css">

If a style sheet for the topic is a separate file (i.e., is not in the private header) it should be placed in or uploaded to the /files directory (so it will be included if the topic is published), and a link to it is needed in the header, for example:

  <link rel="stylesheet" type="text/css" href="files/Jottings.css">

Note: even when using a private header the style sheet should still be set on the Change topic settings page so its effects will be seen when viewing page content during editing.

It is recommended, but not required, that the name of the style sheet be the name of the topic if it is unique to the topic.

Style Sheets was last edited on 2017-01-31  
Topic: MemoWiki