"Perquè pots veure de quanta honor és digna [Casa Reial de Catalunya-Aragó], car és Casa que Déu ha elegida a fort grans obres a fer, e a fort meravelloses."
authors (basic) Wikistyle basicsWikiStyles allow authors to modify the color and other styling attributes of a page's contents. A wikistyle is written using percent-signs, as in The most basic use of wikistyles is to change text attributes such as color, background color, and font. PmWiki defines several wikistyles for changing the text color to %black%, %white%, %red%, %yellow%, %blue%, %gray%, %silver%, %maroon%, %green%, %navy%, and %purple%.
For colors other than the predefined colors, use the
To change the background color, use
See PmWiki:WikiStyleColors for more color help. ScopesWikistyles can also specify a scope; with no scope, the style is applied to any text that follows up to the next wikistyle specification or the end of the paragraph, whichever comes first. Including a scope changes the specification to apply to the whole paragraph (
The
Wikistyle attributesThe style attributes recognized within a wikistyle specification are: ------------ CSS ------------- --HTML-- color bgcolor class background-color margin id text-align padding hspace text-decoration border vspace font-size float target font-family list-style rel font-weight width* accesskey font-style height* value Special: define, apply The attributes in the first two columns correspond to the cascading style sheet (CSS) properties of the same name. The attributes in the last column apply only to specific items:
* The width and height attributes have asterisks because they are handled specially for <img .../> tags. If used by themselves (i.e., without anything providing an "apply=" parameter to the wikistyle), then they set the 'width=' and 'height=' attributes of any <img ... /> tags that follow. Otherwise, they set the 'width:' and 'height:' properties of the element being styled. Enabling StylesStyles not listed above can be enabled by a PMWiki Adminstrator by modifying the local/config.php file. For instance to enable the "line-height" style attribute add the line $WikiStyleCSS[] = 'line-height'; to the local/config.php file. Custom style shortcutsThe
Tip: It's often a good idea to put common style definitions into Group Header pages so that they can be shared among multiple pages in a group. Or, the wiki administrator can predefine styles site-wide as a local customization (see CustomWikiStyles). Tip: Use custom style definitions to associate meanings with text instead of just colors. For example, if warnings are to be displayed as green text, set Predefined style shortcutsPmWiki defines a number of style shortcuts.
ExamplesWikiStyleExamples contains a number of examples of ways to use wikistyles in pages. Known Issues
See Also<< Table directives | Documentation Index | WikiStyle examples >> |