Skin builders and others who want to change the appearance of the default installation or any of the skins can use this document to see what styles can be created for these html elements.
Naming conventions
All Foswiki class names have the prefix foswiki - for example: foswikiAlert, foswikiToc. This makes it less likely that our CSS classes will get in conflict with other Style Sheets. Remember that CSS class names are case sensitive - Foswiki CSS uses lowercase foswiki.
If you define your own CSS classes, it is preferable that you do not use the foswiki prefix to prevent undesired overriding effects.
A wide range of standard styles are used in the Foswiki core code and topics, and more are used in extensions. The following is an exhaustive list of all styles defined by Foswiki. For the most part, the names are the only documentation of the purpose of the style. For more information on how these styles are used, read the code (sorry!)
CSS class names
Structural elements
.foswikiContainer
Container around all level one page elements to maintain consistent width and margins
.foswikiPage
The container for the complete page contents, just below the body tag (only used by default templates)
.foswikiTopic
The container for the topic contents
.foswikiAttachments
Container for attachments table, including header
table#foswikiAttachmentsTable
Identifier for the attachment table
.foswikiHorizontalList
Container around horizontal bullet list (.foswikiHorizontalList ul)
Container for controls. Introduced with Foswiki 2.0.
.foswikiToolbarHeader
Header in foswikiToolbar. Introduced with Foswiki 2.0.
.foswikiWebIndent
Used by %WEBLIST% to indent sub-web names
.foswikiAccessKey
Access key demarkation
.foswikiSeparator
Separator element between sequential elements; usually a pipe character
.foswikiEditboxStyleMono
Gives the edit textarea monospaced font (not used with WYSWIWYG)
.foswikiEditboxStyleProportional
Gives the edit textarea proportional font (not used with WYSWIWYG)
p.foswikiAllowNonWikiWord
Message "Allow non WikiWord for the new topic name"
.foswikiIcon
Icon image; span around image or the image itself
History
.foswikiDiffTable
Revision table
.foswikiMarker
Demarkation of part
.foswikiDiffDeletedMarker
Demarkation of part that has been deleted
.foswikiDiffDeletedText
Demarkation of part that has been deleted
.foswikiDiffAddedHeader
Demarkation of part that has been added
.foswikiDiffAddedMarker
Demarkation of part that has been added
.foswikiDiffAddedText
Demarkation of part that has been added
.foswikiDiffChangedHeader
Demarkation of part that has been changed
.foswikiDiffChangedText
Demarkation of part that has been changed
.foswikiDiffUnchangedMarker
Demarkation of part that has been unchanged
.foswikiDiffUnchangedText
Demarkation of part that has been unchanged
.foswikiDiffUnchangedTextContents
Demarkation of part that has been unchanged
.foswikiDiffLineNumberHeader
.foswikiDiffDebug
.foswikiDiffDebugRight
.foswikiDiffDebugLeft
Behaviour classes
Markers to invoke behaviour with unobtrusive JavaScript.
.foswikiFocus
Behaviour marker so a field can be given input focus. As of Foswiki 2.0 this also requires to add %JQREQUIRE{"focus"}% to the page.
.foswikiChangeFormButton
"Replace form" button; clicking calls JavaScript function suppressSaveValidation
#foswikiNumberOfResultsContainer
Container identifier to write the number of search results into
input[type="text"].foswikiDefaultText
Behaviour marker so the field will contain default text that disappears when clicked into. The visual style is set with foswikiInputFieldBeforeFocus and foswikiInputFieldFocus. The default text is provided by the title attribute of the form field.
.foswikiJs
Added to the html tag if the browser has javascript enabled.
.foswikiMakeVisible
For elements that should only be visible with JavaScript on: default set to hidden, is made visible by JavaScript. This is how it works: by default the body tag should include the class foswikiNoJs. An onload script replaces that class with foswikiJs. Elements that should be hidden have the class style .foswikiNoJs .foswikiMakeVisible.
.foswikiMakeHidden
For elements that should be hidden with JavaScript on: no default style, is made hidden by JavaScript
.foswikiSort
Sort control
.foswikiMakeVisibleBlock
DEPRECATED as of Foswiki 1.1.0 Use .foswikiMakeVisible - for div elements that should only be visible with JavaScript on: default set to hidden, is made visible by JavaScript
.foswikiMakeVisibleInline
DEPRECATED as of Foswiki 1.1.0 Use span.foswikiMakeVisible - for span elements that should only be visible with JavaScript on: default set to hidden, is made visible by JavaScript
.foswikiPopUp
DEPRECATED as of Foswiki 1.1.0 Use %POPUPWINDOW{"topic"}%
Troubleshooting foswikiFocus
Test for loading error of focus plugin (no message means ok):