DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:style.ini

This is an old revision of the document!


Template style.ini

The style.ini is a ini file in each template's directory1) configuring the generation of CSS styles. It has two sections: [stylesheets] and [replacements] described below.

[stylesheets]

This part defines which CSS files are loaded. Each line is defined as follow:

cssfile.css = mode

cssfile.css is your file name and mode is one of the supported output modes as described at mode.

The stylesheet may can also be a .less file. (See LESS).

[replacements]

DokuWiki's CSS dispatcher is able to replace placeholders in the loaded stylesheets which are configured through the [replacements] section in the templates style.ini. This is especially useful for defining a color scheme once and reuse these colors in all files.

These replacements can also be used as LESS variables.

Guaranteed color placeholders

The following placeholders are the only ones that are safe to be used by plugins. All templates have to implement these at least, but are free to add more.

placeholder variable meaning
__background__ main background color
__background_alt__ alternative background color
__background_neu__ neutral background color
__border__ border color
__text__ main text color
__text_alt__ alternative text color
__text_neu__ neutral text color
__highlight__ highlighted text color (new since Adora Belle)

Example

See for example the style.ini of the Starter template for an overview of the file.

Local style.ini

Since Adora Belle you can overwrite style.ini values in style.local.ini files. (Just create it alongside style.ini if it doesn't exist.) This prevents losing those changes after an upgrade. The file still needs to include each section (i.e. [stylesheets] or [replacements]).

Example:

style.local.ini
[replacements]
 
__text__        = "#000"
__site_width__  = "100%"
1)
if the template supports it
devel/style.ini.1376596068.txt.gz · Last modified: 2013-08-15 21:47 by ach

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki