openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

css.php (8719B)


      1 <?php
      2 /*************************************************************************************
      3  * css.php
      4  * -------
      5  * Author: Nigel McNie (nigel@geshi.org)
      6  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
      7  * Release Version: 1.0.7.20
      8  * Date Started: 2004/06/18
      9  *
     10  * CSS language file for GeSHi.
     11  *
     12  * CHANGES
     13  * -------
     14  * 2004/11/27 (1.0.3)
     15  *  -  Added support for multiple object splitters
     16  * 2004/10/27 (1.0.2)
     17  *   -  Changed regexps to catch "-" symbols
     18  *   -  Added support for URLs
     19  * 2004/08/05 (1.0.1)
     20  *   -  Added support for symbols
     21  * 2004/07/14 (1.0.0)
     22  *   -  First Release
     23  *
     24  * TODO (updated 2004/11/27)
     25  * -------------------------
     26  * * Improve or drop regexps for class/id/psuedoclass highlighting
     27  * * Re-look at keywords - possibly to make several CSS language
     28  *   files, all with different versions of CSS in them
     29  *
     30  *************************************************************************************
     31  *
     32  *     This file is part of GeSHi.
     33  *
     34  *   GeSHi is free software; you can redistribute it and/or modify
     35  *   it under the terms of the GNU General Public License as published by
     36  *   the Free Software Foundation; either version 2 of the License, or
     37  *   (at your option) any later version.
     38  *
     39  *   GeSHi is distributed in the hope that it will be useful,
     40  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     41  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     42  *   GNU General Public License for more details.
     43  *
     44  *   You should have received a copy of the GNU General Public License
     45  *   along with GeSHi; if not, write to the Free Software
     46  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     47  *
     48  ************************************************************************************/
     49 
     50 
     51 $language_data = array (
     52 	'LANG_NAME' => 'CSS',
     53 	'COMMENT_SINGLE' => array(1 => '@'),
     54 	'COMMENT_MULTI' => array('/*' => '*/'),
     55 	'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
     56 	'QUOTEMARKS' => array('"', "'"),
     57 	'ESCAPE_CHAR' => '\\',
     58 	'KEYWORDS' => array(
     59 		1 => array(
     60             'aqua', 'azimuth', 'background-attachment', 'background-color',
     61             'background-image', 'background-position', 'background-repeat',
     62             'background', 'black', 'blue', 'border-bottom-color',
     63             'border-bottom-style', 'border-bottom-width', 'border-left-color',
     64             'border-left-style', 'border-left-width', 'border-right',
     65             'border-right-color', 'border-right-style', 'border-right-width',
     66             'border-top-color', 'border-top-style',
     67             'border-top-width','border-bottom', 'border-collapse',
     68             'border-left', 'border-width', 'border-color', 'border-spacing',
     69             'border-style', 'border-top', 'border', 'caption-side', 'clear',
     70             'clip', 'color', 'content', 'counter-increment', 'counter-reset',
     71             'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
     72             'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
     73             'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
     74             'font-weight', 'font', 'line-height', 'letter-spacing',
     75             'list-style', 'list-style-image', 'list-style-position',
     76             'list-style-type', 'margin-bottom', 'margin-left', 'margin-right',
     77             'margin-top', 'margin', 'marker-offset', 'marks', 'max-height',
     78             'max-width', 'min-height', 'min-width', 'orphans', 'outline',
     79             'outline-color', 'outline-style', 'outline-width', 'overflow',
     80             'padding-bottom', 'padding-left', 'padding-right', 'padding-top',
     81             'padding', 'page', 'page-break-after', 'page-break-before',
     82             'page-break-inside', 'pause-after', 'pause-before', 'pause',
     83             'pitch', 'pitch-range', 'play-during', 'position', 'quotes',
     84             'richness', 'right', 'size', 'speak-header', 'speak-numeral',
     85             'speak-punctuation', 'speak', 'speech-rate', 'stress',
     86             'table-layout', 'text-align', 'text-decoration', 'text-indent',
     87             'text-shadow', 'text-transform', 'top', 'unicode-bidi',
     88             'vertical-align', 'visibility', 'voice-family', 'volume',
     89             'white-space', 'widows', 'width', 'word-spacing', 'z-index',
     90             'bottom', 'left', 'height'
     91         ),
     92 		2 => array(
     93              'above', 'absolute', 'always', 'armenian', 'aural', 'auto',
     94              'avoid', 'baseline', 'behind', 'below', 'bidi-override', 'blink',
     95              'block', 'bold', 'bolder', 'both', 'capitalize', 'center-left',
     96              'center-right', 'center', 'circle', 'cjk-ideographic',
     97              'close-quote', 'collapse', 'condensed', 'continuous', 'crop',
     98              'crosshair', 'cross', 'cursive', 'dashed', 'decimal-leading-zero',
     99              'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
    100              'e-resize', 'embed', 'extra-condensed', 'extra-expanded',
    101              'expanded', 'fantasy', 'far-left', 'far-right', 'faster', 'fast',
    102              'fixed', 'fuchsia', 'georgian', 'gray', 'green', 'groove',
    103              'hebrew', 'help', 'hidden', 'hide', 'higher', 'high',
    104              'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table',
    105              'inline', 'inset', 'inside', 'invert', 'italic', 'justify',
    106              'katakana-iroha', 'katakana', 'landscape', 'larger', 'large',
    107              'left-side', 'leftwards', 'level', 'lighter', 'lime',
    108              'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek',
    109              'lower-roman', 'lowercase', 'ltr', 'lower', 'low', 'maroon',
    110              'medium', 'message-box', 'middle', 'mix', 'monospace', 'n-resize',
    111              'narrower', 'navy', 'ne-resize', 'no-close-quote',
    112              'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap',
    113              'nw-resize', 'oblique', 'olive', 'once', 'open-quote', 'outset',
    114              'outside', 'overline', 'pointer', 'portrait', 'purple', 'px',
    115              'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb',
    116              'ridge', 'right-side', 'rightwards', 's-resize', 'sans-serif',
    117              'scroll', 'se-resize', 'semi-condensed', 'semi-expanded',
    118              'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower',
    119              'small-caps', 'small-caption', 'smaller', 'soft', 'solid',
    120              'spell-out', 'square', 'static', 'status-bar', 'super',
    121              'sw-resize', 'table-caption', 'table-cell', 'table-column',
    122              'table-column-group', 'table-footer-group', 'table-header-group',
    123              'table-row', 'table-row-group', 'teal', 'text', 'text-bottom',
    124              'text-top', 'thick', 'thin', 'transparent', 'ultra-condensed',
    125              'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin',
    126              'upper-roman', 'uppercase', 'url', 'visible', 'w-resize', 'wait',
    127              'white', 'wider', 'x-fast', 'x-high', 'x-large', 'x-loud',
    128              'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 'yellow',
    129              'yes'
    130             )
    131         ),
    132 	'SYMBOLS' => array(
    133 		'(', ')', '{', '}', ':', ';'
    134 		),
    135 	'CASE_SENSITIVE' => array(
    136 		GESHI_COMMENTS => false,
    137 		1 => true,
    138 		2 => true
    139 		),
    140 	'STYLES' => array(
    141 		'KEYWORDS' => array(
    142 			1 => 'color: #000000; font-weight: bold;',
    143 			2 => 'color: #993333;'
    144 			),
    145 		'COMMENTS' => array(
    146 			1 => 'color: #a1a100;',
    147 			'MULTI' => 'color: #808080; font-style: italic;'
    148 			),
    149 		'ESCAPE_CHAR' => array(
    150 			0 => 'color: #000099; font-weight: bold;'
    151 			),
    152 		'BRACKETS' => array(
    153 			0 => 'color: #66cc66;'
    154 			),
    155 		'STRINGS' => array(
    156 			0 => 'color: #ff0000;'
    157 			),
    158 		'NUMBERS' => array(
    159 			0 => 'color: #cc66cc;'
    160 			),
    161 		'METHODS' => array(
    162 			),
    163 		'SYMBOLS' => array(
    164 			0 => 'color: #66cc66;'
    165 			),
    166 		'SCRIPT' => array(
    167 			),
    168 		'REGEXPS' => array(
    169 			0 => 'color: #cc00cc;',
    170 			1 => 'color: #6666ff;',
    171 			2 => 'color: #3333ff;',
    172             3 => 'color: #933;',
    173             4 => 'color: #933;',
    174 			)
    175 		),
    176 	'URLS' => array(
    177 		1 => '',
    178 		2 => ''
    179 		),
    180 	'OOLANG' => false,
    181 	'OBJECT_SPLITTERS' => array(
    182 		),
    183 	'REGEXPS' => array(
    184 		0 => '\#[a-zA-Z0-9\-_]+',
    185 		1 => '\.[a-zA-Z0-9\-_]+',
    186         2 => ':[a-zA-Z0-9\-]+',
    187         3 => '(\d+|(\d*\.\d+))(em|ex|pt|px|cm|in|%)',
    188         4 => array(
    189             GESHI_SEARCH    => '(url\()([^)]+)(\))',
    190             GESHI_REPLACE   => '\\2',
    191             GESHI_BEFORE    => '\\1',
    192             GESHI_AFTER     => '\\3',
    193             GESHI_MODIFIERS => 'si'
    194         )
    195 		),
    196 	'STRICT_MODE_APPLIES' => GESHI_NEVER,
    197 	'SCRIPT_DELIMITERS' => array(
    198 		),
    199 	'HIGHLIGHT_STRICT_BLOCK' => array(
    200         ),
    201     'TAB_WIDTH' => 4
    202 );
    203 
    204 if (isset($this) && is_a($this, 'GeSHi')) {
    205     $language_data['STYLES']['NUMBERS'][0] = $language_data['STYLES']['REGEXPS'][3];
    206 }
    207 
    208 ?>