Skip to main content.
Navigation: Home | Edit | HistoryLoginBackLinkIndex
Breadcrumbs : skins » sysreq » 18 » 2005dec » plugins » markup » styles
Table of contents

Styles

Styles provide the ability to change the appearance of text. At present this is limited to text colour and highlight color
Included via Add-On script wikidx_styles.php

 

 

Inline Styles

The most basic form of style is to use a pre-defined style. The default install contains (red, purple, blue, green, black, yellow, white, gray, silver, maroon, navy, darkgreen, brightgreen). You simply surround the colour name with two percent signs ie %blue% to change the text to blue.
The style will be applied to all subsequent text on the edit line. There is a shortcut of %% (two % with no spaces) that will set the style back to the default colour (black).

 

You can set your own style using the keywords color and bgcolor (background-color can also be used), ie %color=yellow bgcolor=blue% which results in yellow on blue.

 

Styles can also be defined within a page using the command syntax {{ }}. The style is only valid for the life of the page.
  {{style whiteongreen color=white background-color=green}}
This will create or replace the style <name> with the supplied attributes. You can then simply call this style using the %<name>% syntax, ie white on green.

 

One further combination is to stack the styles, ie %whiteongreen yellow% would apply the white text, green background, and then stack on the yellow text. The result being yellow on green

 

 

Adding your own styles to custom.php file

Using this approach you can add a style that is available to all pages covered by the custom.php file. This is done by extending the built-in styles (see above) by adding to the $Style[] array. Use the syntax below to add to your custom.php file
  $Style['dtgreen'] = "color=white; background-color=green;";