A tumblelog CMS built on AJAX, PHP and MySQL.

css.php 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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.21
  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. $language_data = array (
  50. 'LANG_NAME' => 'CSS',
  51. 'COMMENT_SINGLE' => array(1 => '@'),
  52. 'COMMENT_MULTI' => array('/*' => '*/'),
  53. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  54. 'QUOTEMARKS' => array('"', "'"),
  55. 'ESCAPE_CHAR' => '\\',
  56. 'KEYWORDS' => array(
  57. 1 => array(
  58. 'aqua', 'azimuth', 'background-attachment', 'background-color',
  59. 'background-image', 'background-position', 'background-repeat',
  60. 'background', 'black', 'blue', 'border-bottom-color',
  61. 'border-bottom-style', 'border-bottom-width', 'border-left-color',
  62. 'border-left-style', 'border-left-width', 'border-right',
  63. 'border-right-color', 'border-right-style', 'border-right-width',
  64. 'border-top-color', 'border-top-style',
  65. 'border-top-width','border-bottom', 'border-collapse',
  66. 'border-left', 'border-width', 'border-color', 'border-spacing',
  67. 'border-style', 'border-top', 'border', 'caption-side', 'clear',
  68. 'clip', 'color', 'content', 'counter-increment', 'counter-reset',
  69. 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
  70. 'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
  71. 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
  72. 'font-weight', 'font', 'line-height', 'letter-spacing',
  73. 'list-style', 'list-style-image', 'list-style-position',
  74. 'list-style-type', 'margin-bottom', 'margin-left', 'margin-right',
  75. 'margin-top', 'margin', 'marker-offset', 'marks', 'max-height',
  76. 'max-width', 'min-height', 'min-width', 'orphans', 'outline',
  77. 'outline-color', 'outline-style', 'outline-width', 'overflow',
  78. 'padding-bottom', 'padding-left', 'padding-right', 'padding-top',
  79. 'padding', 'page', 'page-break-after', 'page-break-before',
  80. 'page-break-inside', 'pause-after', 'pause-before', 'pause',
  81. 'pitch', 'pitch-range', 'play-during', 'position', 'quotes',
  82. 'richness', 'right', 'size', 'speak-header', 'speak-numeral',
  83. 'speak-punctuation', 'speak', 'speech-rate', 'stress',
  84. 'table-layout', 'text-align', 'text-decoration', 'text-indent',
  85. 'text-shadow', 'text-transform', 'top', 'unicode-bidi',
  86. 'vertical-align', 'visibility', 'voice-family', 'volume',
  87. 'white-space', 'widows', 'width', 'word-spacing', 'z-index',
  88. 'bottom', 'left', 'height'
  89. ),
  90. 2 => array(
  91. 'above', 'absolute', 'always', 'armenian', 'aural', 'auto',
  92. 'avoid', 'baseline', 'behind', 'below', 'bidi-override', 'blink',
  93. 'block', 'bold', 'bolder', 'both', 'capitalize', 'center-left',
  94. 'center-right', 'center', 'circle', 'cjk-ideographic',
  95. 'close-quote', 'collapse', 'condensed', 'continuous', 'crop',
  96. 'crosshair', 'cross', 'cursive', 'dashed', 'decimal-leading-zero',
  97. 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
  98. 'e-resize', 'embed', 'extra-condensed', 'extra-expanded',
  99. 'expanded', 'fantasy', 'far-left', 'far-right', 'faster', 'fast',
  100. 'fixed', 'fuchsia', 'georgian', 'gray', 'green', 'groove',
  101. 'hebrew', 'help', 'hidden', 'hide', 'higher', 'high',
  102. 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table',
  103. 'inline', 'inset', 'inside', 'invert', 'italic', 'justify',
  104. 'katakana-iroha', 'katakana', 'landscape', 'larger', 'large',
  105. 'left-side', 'leftwards', 'level', 'lighter', 'lime',
  106. 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek',
  107. 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', 'maroon',
  108. 'medium', 'message-box', 'middle', 'mix', 'monospace', 'n-resize',
  109. 'narrower', 'navy', 'ne-resize', 'no-close-quote',
  110. 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap',
  111. 'nw-resize', 'oblique', 'olive', 'once', 'open-quote', 'outset',
  112. 'outside', 'overline', 'pointer', 'portrait', 'purple', 'px',
  113. 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb',
  114. 'ridge', 'right-side', 'rightwards', 's-resize', 'sans-serif',
  115. 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded',
  116. 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower',
  117. 'small-caps', 'small-caption', 'smaller', 'soft', 'solid',
  118. 'spell-out', 'square', 'static', 'status-bar', 'super',
  119. 'sw-resize', 'table-caption', 'table-cell', 'table-column',
  120. 'table-column-group', 'table-footer-group', 'table-header-group',
  121. 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom',
  122. 'text-top', 'thick', 'thin', 'transparent', 'ultra-condensed',
  123. 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin',
  124. 'upper-roman', 'uppercase', 'url', 'visible', 'w-resize', 'wait',
  125. 'white', 'wider', 'x-fast', 'x-high', 'x-large', 'x-loud',
  126. 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 'yellow',
  127. 'yes'
  128. )
  129. ),
  130. 'SYMBOLS' => array(
  131. '(', ')', '{', '}', ':', ';'
  132. ),
  133. 'CASE_SENSITIVE' => array(
  134. GESHI_COMMENTS => false,
  135. 1 => true,
  136. 2 => true
  137. ),
  138. 'STYLES' => array(
  139. 'KEYWORDS' => array(
  140. 1 => 'color: #000000; font-weight: bold;',
  141. 2 => 'color: #993333;'
  142. ),
  143. 'COMMENTS' => array(
  144. 1 => 'color: #a1a100;',
  145. 'MULTI' => 'color: #808080; font-style: italic;'
  146. ),
  147. 'ESCAPE_CHAR' => array(
  148. 0 => 'color: #000099; font-weight: bold;'
  149. ),
  150. 'BRACKETS' => array(
  151. 0 => 'color: #66cc66;'
  152. ),
  153. 'STRINGS' => array(
  154. 0 => 'color: #ff0000;'
  155. ),
  156. 'NUMBERS' => array(
  157. 0 => 'color: #cc66cc;'
  158. ),
  159. 'METHODS' => array(
  160. ),
  161. 'SYMBOLS' => array(
  162. 0 => 'color: #66cc66;'
  163. ),
  164. 'SCRIPT' => array(
  165. ),
  166. 'REGEXPS' => array(
  167. 0 => 'color: #cc00cc;',
  168. 1 => 'color: #6666ff;',
  169. 2 => 'color: #3333ff;',
  170. 3 => 'color: #933;',
  171. 4 => 'color: #933;',
  172. )
  173. ),
  174. 'URLS' => array(
  175. 1 => '',
  176. 2 => ''
  177. ),
  178. 'OOLANG' => false,
  179. 'OBJECT_SPLITTERS' => array(
  180. ),
  181. 'REGEXPS' => array(
  182. 0 => '\#[a-zA-Z0-9\-_]+',
  183. 1 => '\.[a-zA-Z0-9\-_]+',
  184. 2 => ':[a-zA-Z0-9\-]+',
  185. 3 => '(\d+|(\d*\.\d+))(em|ex|pt|px|cm|in|%)',
  186. 4 => array(
  187. GESHI_SEARCH => '(url\()([^)]+)(\))',
  188. GESHI_REPLACE => '\\2',
  189. GESHI_BEFORE => '\\1',
  190. GESHI_AFTER => '\\3',
  191. GESHI_MODIFIERS => 'si'
  192. )
  193. ),
  194. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  195. 'SCRIPT_DELIMITERS' => array(
  196. ),
  197. 'HIGHLIGHT_STRICT_BLOCK' => array(
  198. ),
  199. 'TAB_WIDTH' => 4
  200. );
  201. if (isset($this) && is_a($this, 'GeSHi')) {
  202. $language_data['STYLES']['NUMBERS'][0] = $language_data['STYLES']['REGEXPS'][3];
  203. }
  204. ?>