From: moodler Date: Wed, 24 Jan 2007 07:08:50 +0000 (+0000) Subject: Added some docs from MDL-6798 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=eb8cc38e655019f02119a9a0f25468585320d329;p=moodle.git Added some docs from MDL-6798 --- diff --git a/lib/cssconstants.php b/lib/cssconstants.php index 144a39cc51..6fbb0253eb 100644 --- a/lib/cssconstants.php +++ b/lib/cssconstants.php @@ -1,8 +1,68 @@ -cssconstants = true; + /// By setting this to true, you will be able to use CSS constants + + + The constant definitions are written into a separate CSS file named like "constants.css" and loaded first in config.php. You can use constants for any CSS properties. The constant definition looks like: + +@server constants { + fontColor: #3a2830; + aLink: #116699; + aVisited: #AA2200; + aHover: #779911; + pageBackground: #FFFFFF; + backgroundColor: #EEEEEE; + backgroundSideblockHeader: #a8a4e9; + fontcolorSideblockHeader: #222222; + color1: #98818b; + color2: #bd807b; + color3: #f9d1d7; + color4: #e8d4d8; +} + + + +The lines in the CSS files using CSS constants look like: + +body { + font-size: 100%; + background-color: pageBackground; + color: fontColor; + font-family: 'Bitstream Vera Serif', georgia, times, serif; + margin: 0; + padding: 0; +} +div#page { + margin: 0 10px; + padding-top: 5px; + border-top-width: 10px; + border-top-style: solid; + border-top-color: color3; +} +div.clearer { + clear: both; +} +a:link { + color: aLink; +} + +******************************************************************************/ + function replace_cssconstants($css) { if (preg_match_all("/@server\s+(?:variables|constants)\s*\{\s*([^\}]+)\s*\}\s*/i",$css,$matches)) { $variables = array();