css.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. /*
  2. Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
  3. Available via Academic Free License >= 2.1 OR the modified BSD license.
  4. see: http://dojotoolkit.org/license for details
  5. */
  6. if(!dojo._hasResource["dojox.highlight.languages.pygments.css"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
  7. dojo._hasResource["dojox.highlight.languages.pygments.css"] = true;
  8. dojo.provide("dojox.highlight.languages.pygments.css");
  9. dojo.require("dojox.highlight._base");
  10. dojo.require("dojox.highlight.languages.pygments._html");
  11. (function(){
  12. var dh = dojox.highlight, dhl = dh.languages;
  13. dhl.css = {
  14. defaultMode: {
  15. lexems: ["\\b[a-zA-Z0-9]+\\b", "\\b@media\b"],
  16. keywords: {
  17. "keyword": {
  18. "@media": 1
  19. },
  20. "name tag": dhl.pygments._html.tags
  21. },
  22. contains: [
  23. "comment",
  24. "string single", "string double",
  25. "punctuation",
  26. "name decorator", "name class", "name function",
  27. "_content"
  28. ]
  29. },
  30. modes: [
  31. // comments
  32. {
  33. className: "comment",
  34. begin: "/\\*", end: "\\*/",
  35. relevance: 0
  36. },
  37. {
  38. className: "comment preproc",
  39. begin: "@[a-z][a-zA-Z]*", end: "^"
  40. },
  41. {
  42. className: "comment preproc",
  43. begin: "\\!important\\b", end: "^"
  44. },
  45. // numbers
  46. {
  47. className: "number",
  48. begin: "\\#[a-fA-F0-9]{3}\\b", end: "^",
  49. relevance: 0
  50. },
  51. {
  52. className: "number",
  53. begin: "\\#[a-fA-F0-9]{6}\\b", end: "^",
  54. relevance: 0
  55. },
  56. {
  57. className: "number",
  58. begin: "[\\.\\-]?[0-9]*[\\.]?[0-9]+(em|px|\\%|pt|pc|in|mm|cm|ex)", end: "^",
  59. relevance: 0
  60. },
  61. {
  62. className: "number",
  63. begin: "\\-?[0-9]+", end: "^",
  64. relevance: 0
  65. },
  66. // strings
  67. {
  68. className: "string single",
  69. begin: "'", end: "'",
  70. illegal: "\\n",
  71. relevance: 0
  72. },
  73. {
  74. className: "string double",
  75. begin: '"',
  76. end: '"',
  77. illegal: "\\n",
  78. relevance: 0
  79. },
  80. // operators
  81. {
  82. className: "operator",
  83. begin: "[~\\^\\*!%&\\[\\]\\(\\)<>\\|+=@:;,./?-]", end: "^",
  84. relevance: 0
  85. },
  86. // punctuations
  87. {
  88. className: "punctuation",
  89. begin: "[\\[\\]();]+", end: "^",
  90. relevance: 0
  91. },
  92. // names
  93. {
  94. className: "name decorator",
  95. begin: "\\:[a-zA-Z0-9_\\-]+\\b", end: "^"
  96. },
  97. {
  98. className: "name class",
  99. begin: "\\.[a-zA-Z0-9_\\-]+\\b", end: "^"
  100. },
  101. {
  102. className: "name function",
  103. begin: "\\#[a-zA-Z0-9_\\-]+\\b", end: "^"
  104. },
  105. {
  106. className: "_content",
  107. begin: "\\{", end: "\\}",
  108. lexems: ["\\b[a-zA-Z\\-]+\\b"],
  109. keywords: {
  110. "keyword": {
  111. "azimuth": 1, "background-attachment": 1, "background-color": 1,
  112. "background-image": 1, "background-position": 1, "background-repeat": 1,
  113. "background": 1, "border-bottom-color": 1, "border-bottom-style": 1,
  114. "border-bottom-width": 1, "border-left-color": 1, "border-left-style": 1,
  115. "border-left-width": 1, "border-right": 1, "border-right-color": 1,
  116. "border-right-style": 1, "border-right-width": 1, "border-top-color": 1,
  117. "border-top-style": 1, "border-top-width": 1, "border-bottom": 1,
  118. "border-collapse": 1, "border-left": 1, "border-width": 1, "border-color": 1,
  119. "border-spacing": 1, "border-style": 1, "border-top": 1, "border": 1, "caption-side": 1,
  120. "clear": 1, "clip": 1, "color": 1, "content": 1, "counter-increment": 1, "counter-reset": 1,
  121. "cue-after": 1, "cue-before": 1, "cue": 1, "cursor": 1, "direction": 1, "display": 1,
  122. "elevation": 1, "empty-cells": 1, "float": 1, "font-family": 1, "font-size": 1,
  123. "font-size-adjust": 1, "font-stretch": 1, "font-style": 1, "font-variant": 1,
  124. "font-weight": 1, "font": 1, "height": 1, "letter-spacing": 1, "line-height": 1,
  125. "list-style-type": 1, "list-style-image": 1, "list-style-position": 1,
  126. "list-style": 1, "margin-bottom": 1, "margin-left": 1, "margin-right": 1,
  127. "margin-top": 1, "margin": 1, "marker-offset": 1, "marks": 1, "max-height": 1, "max-width": 1,
  128. "min-height": 1, "min-width": 1, "opacity": 1, "orphans": 1, "outline": 1, "outline-color": 1,
  129. "outline-style": 1, "outline-width": 1, "overflow": 1, "padding-bottom": 1,
  130. "padding-left": 1, "padding-right": 1, "padding-top": 1, "padding": 1, "page": 1,
  131. "page-break-after": 1, "page-break-before": 1, "page-break-inside": 1,
  132. "pause-after": 1, "pause-before": 1, "pause": 1, "pitch": 1, "pitch-range": 1,
  133. "play-during": 1, "position": 1, "quotes": 1, "richness": 1, "right": 1, "size": 1,
  134. "speak-header": 1, "speak-numeral": 1, "speak-punctuation": 1, "speak": 1,
  135. "speech-rate": 1, "stress": 1, "table-layout": 1, "text-align": 1, "text-decoration": 1,
  136. "text-indent": 1, "text-shadow": 1, "text-transform": 1, "top": 1, "unicode-bidi": 1,
  137. "vertical-align": 1, "visibility": 1, "voice-family": 1, "volume": 1, "white-space": 1,
  138. "widows": 1, "width": 1, "word-spacing": 1, "z-index": 1, "bottom": 1, "left": 1,
  139. "above": 1, "absolute": 1, "always": 1, "armenian": 1, "aural": 1, "auto": 1, "avoid": 1, "baseline": 1,
  140. "behind": 1, "below": 1, "bidi-override": 1, "blink": 1, "block": 1, "bold": 1, "bolder": 1, "both": 1,
  141. "capitalize": 1, "center-left": 1, "center-right": 1, "center": 1, "circle": 1,
  142. "cjk-ideographic": 1, "close-quote": 1, "collapse": 1, "condensed": 1, "continuous": 1,
  143. "crop": 1, "crosshair": 1, "cross": 1, "cursive": 1, "dashed": 1, "decimal-leading-zero": 1,
  144. "decimal": 1, "default": 1, "digits": 1, "disc": 1, "dotted": 1, "double": 1, "e-resize": 1, "embed": 1,
  145. "extra-condensed": 1, "extra-expanded": 1, "expanded": 1, "fantasy": 1, "far-left": 1,
  146. "far-right": 1, "faster": 1, "fast": 1, "fixed": 1, "georgian": 1, "groove": 1, "hebrew": 1, "help": 1,
  147. "hidden": 1, "hide": 1, "higher": 1, "high": 1, "hiragana-iroha": 1, "hiragana": 1, "icon": 1,
  148. "inherit": 1, "inline-table": 1, "inline": 1, "inset": 1, "inside": 1, "invert": 1, "italic": 1,
  149. "justify": 1, "katakana-iroha": 1, "katakana": 1, "landscape": 1, "larger": 1, "large": 1,
  150. "left-side": 1, "leftwards": 1, "level": 1, "lighter": 1, "line-through": 1, "list-item": 1,
  151. "loud": 1, "lower-alpha": 1, "lower-greek": 1, "lower-roman": 1, "lowercase": 1, "ltr": 1,
  152. "lower": 1, "low": 1, "medium": 1, "message-box": 1, "middle": 1, "mix": 1, "monospace": 1,
  153. "n-resize": 1, "narrower": 1, "ne-resize": 1, "no-close-quote": 1, "no-open-quote": 1,
  154. "no-repeat": 1, "none": 1, "normal": 1, "nowrap": 1, "nw-resize": 1, "oblique": 1, "once": 1,
  155. "open-quote": 1, "outset": 1, "outside": 1, "overline": 1, "pointer": 1, "portrait": 1, "px": 1,
  156. "relative": 1, "repeat-x": 1, "repeat-y": 1, "repeat": 1, "rgb": 1, "ridge": 1, "right-side": 1,
  157. "rightwards": 1, "s-resize": 1, "sans-serif": 1, "scroll": 1, "se-resize": 1,
  158. "semi-condensed": 1, "semi-expanded": 1, "separate": 1, "serif": 1, "show": 1, "silent": 1,
  159. "slow": 1, "slower": 1, "small-caps": 1, "small-caption": 1, "smaller": 1, "soft": 1, "solid": 1,
  160. "spell-out": 1, "square": 1, "static": 1, "status-bar": 1, "super": 1, "sw-resize": 1,
  161. "table-caption": 1, "table-cell": 1, "table-column": 1, "table-column-group": 1,
  162. "table-footer-group": 1, "table-header-group": 1, "table-row": 1,
  163. "table-row-group": 1, "text": 1, "text-bottom": 1, "text-top": 1, "thick": 1, "thin": 1,
  164. "transparent": 1, "ultra-condensed": 1, "ultra-expanded": 1, "underline": 1,
  165. "upper-alpha": 1, "upper-latin": 1, "upper-roman": 1, "uppercase": 1, "url": 1,
  166. "visible": 1, "w-resize": 1, "wait": 1, "wider": 1, "x-fast": 1, "x-high": 1, "x-large": 1, "x-loud": 1,
  167. "x-low": 1, "x-small": 1, "x-soft": 1, "xx-large": 1, "xx-small": 1, "yes": 1
  168. },
  169. "name builtin": {
  170. "indigo": 1, "gold": 1, "firebrick": 1, "indianred": 1, "yellow": 1, "darkolivegreen": 1,
  171. "darkseagreen": 1, "mediumvioletred": 1, "mediumorchid": 1, "chartreuse": 1,
  172. "mediumslateblue": 1, "black": 1, "springgreen": 1, "crimson": 1, "lightsalmon": 1, "brown": 1,
  173. "turquoise": 1, "olivedrab": 1, "cyan": 1, "silver": 1, "skyblue": 1, "gray": 1, "darkturquoise": 1,
  174. "goldenrod": 1, "darkgreen": 1, "darkviolet": 1, "darkgray": 1, "lightpink": 1, "teal": 1,
  175. "darkmagenta": 1, "lightgoldenrodyellow": 1, "lavender": 1, "yellowgreen": 1, "thistle": 1,
  176. "violet": 1, "navy": 1, "orchid": 1, "blue": 1, "ghostwhite": 1, "honeydew": 1, "cornflowerblue": 1,
  177. "darkblue": 1, "darkkhaki": 1, "mediumpurple": 1, "cornsilk": 1, "red": 1, "bisque": 1, "slategray": 1,
  178. "darkcyan": 1, "khaki": 1, "wheat": 1, "deepskyblue": 1, "darkred": 1, "steelblue": 1, "aliceblue": 1,
  179. "gainsboro": 1, "mediumturquoise": 1, "floralwhite": 1, "coral": 1, "purple": 1, "lightgrey": 1,
  180. "lightcyan": 1, "darksalmon": 1, "beige": 1, "azure": 1, "lightsteelblue": 1, "oldlace": 1,
  181. "greenyellow": 1, "royalblue": 1, "lightseagreen": 1, "mistyrose": 1, "sienna": 1,
  182. "lightcoral": 1, "orangered": 1, "navajowhite": 1, "lime": 1, "palegreen": 1, "burlywood": 1,
  183. "seashell": 1, "mediumspringgreen": 1, "fuchsia": 1, "papayawhip": 1, "blanchedalmond": 1,
  184. "peru": 1, "aquamarine": 1, "white": 1, "darkslategray": 1, "ivory": 1, "dodgerblue": 1,
  185. "lemonchiffon": 1, "chocolate": 1, "orange": 1, "forestgreen": 1, "slateblue": 1, "olive": 1,
  186. "mintcream": 1, "antiquewhite": 1, "darkorange": 1, "cadetblue": 1, "moccasin": 1,
  187. "limegreen": 1, "saddlebrown": 1, "darkslateblue": 1, "lightskyblue": 1, "deeppink": 1,
  188. "plum": 1, "aqua": 1, "darkgoldenrod": 1, "maroon": 1, "sandybrown": 1, "magenta": 1, "tan": 1,
  189. "rosybrown": 1, "pink": 1, "lightblue": 1, "palevioletred": 1, "mediumseagreen": 1,
  190. "dimgray": 1, "powderblue": 1, "seagreen": 1, "snow": 1, "mediumblue": 1, "midnightblue": 1,
  191. "paleturquoise": 1, "palegoldenrod": 1, "whitesmoke": 1, "darkorchid": 1, "salmon": 1,
  192. "lightslategray": 1, "lawngreen": 1, "lightgreen": 1, "tomato": 1, "hotpink": 1,
  193. "lightyellow": 1, "lavenderblush": 1, "linen": 1, "mediumaquamarine": 1, "green": 1,
  194. "blueviolet": 1, "peachpuff": 1
  195. }
  196. },
  197. contains: [
  198. "comment", "comment preproc",
  199. "number",
  200. "string single", "string double",
  201. "punctuation",
  202. "name decorator", "name class", "name function"
  203. ]
  204. }
  205. ]
  206. };
  207. })();
  208. }