<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
	Proposed language specification for CSS (Cascading Style Sheet) files.
 
	Reference used:
 		http://www.w3.org/TR/CSS2/

 	Tested with:
 		http://www.simplebits.com/css/simple.css
 
	Submitted by Scott Martin (scott@coffeeblack.org)
-->
<language _name="CSS" version="1.0" _section="Others" mimetypes="text/css">
	
	<escape-char>\</escape-char>
	
	<string _name="String" style="String" end-at-line-end="FALSE">
		<start-regex>&quot;</start-regex>
		<end-regex>&quot;</end-regex>
	</string>

	<string _name="String 2" style="String" end-at-line-end="FALSE">
		<start-regex>&apos;</start-regex>
		<end-regex>&apos;</end-regex>
	</string>

	<block-comment _name="Block Comment" style="Comment">
		<start-regex>/\*</start-regex>
		<end-regex>\*/</end-regex>
	</block-comment>

	<line-comment _name="Line Comment" style="Comment">
		<start-regex>//</start-regex>
	</line-comment>
	
	<!--
		Escaped unicode characters can contain either 6 hexadecimal characters
		or 1-5 hex characters followed by one whitespace character.
	-->
	<pattern-item _name="Unicode Character Reference" style="Others 2">
		<regex>\\([a-fA-F0-9]{1,5}[ \t]|[a-fA-F0-9]{6})</regex>
	</pattern-item>
	
	<!--
		Brackets define a declaration block, parentheses define functions.
	-->
	<pattern-item _name="Punctuators" style="Others 3">
		<regex>[{}();,]</regex>
	</pattern-item>
	
	<!--
		For CSS 2-style selectors: tag[attr="value"].
	-->
	<pattern-item _name="Attribute Value Delimiters" style="Others 2">
		<regex>(\[|\])</regex>
	</pattern-item>
	
	<pattern-item _name="Operators" style="Function">
		<regex>[@%~|!=]</regex>
	</pattern-item>
	
	<!--
		Used to combine selectors. Example syntax:

			body * div#ID.className > p + ul li:first-child
	-->
	<pattern-item _name="Selector Grammar" style="Others 3">
		<regex>[*#.&gt;+]</regex>
	</pattern-item>

	<!--
		Pseudo-element rules. Good to have syntax highlighting for these
		for mistypings.
	-->
	<keyword-list _name="Selector Pseudo Elements" style="Function">
		<keyword>first-line</keyword>
		<keyword>first-letter</keyword>
		<keyword>before</keyword>
		<keyword>after</keyword>
	</keyword-list>
	
	<!--
		Pseudo-class rules. Good to have syntax highlighting for these
		for mistypings.
	-->
	<keyword-list _name="Selector Pseudo Classes" style="Function">
		<keyword>first-child</keyword>
		<keyword>link</keyword>
		<keyword>visited</keyword>
		<keyword>hover</keyword>
		<keyword>active</keyword>
		<keyword>focus</keyword>
		<keyword>lang</keyword>
	</keyword-list>
	
	<!--
		At rules must occur at the start of a line.
	-->
	<keyword-list _name="At Rules" style="Preprocessor" beginning-regex="^[ \t]*@">
		<keyword>charset</keyword>
		<keyword>font-face</keyword>
		<keyword>media</keyword>
		<keyword>page</keyword>
		<keyword>import</keyword>
	</keyword-list>
	
	<!--
		Hexadecimal method of specifying colors. Can either be 3 or 6 in
		length: #ffcc00 = #fc0.
	-->
	<pattern-item _name="Hexadecimal Color" style="Base-N Integer">
		<regex>#([a-fA-F0-9]{3}|[a-fA-F0-9]{6})</regex>
	</pattern-item>
	
	<!--
		CSS functions, such as rgb(), clip(), or lang().
	-->
	<syntax-item _name="Function" style="Function">
		<start-regex>[a-zA-Z][a-z0-9-]+\(</start-regex>
		<end-regex>\)</end-regex>
	</syntax-item>
	
	<!--
		Value length specifier. Unless it is 0, must always be like: -1.2em.
	-->
	<pattern-item _name="Dimension" style="Floating Point">
		<regex>[\+-]?([0-9]+|[0-9]*\.[0-9]+)(%|e(m|x)|p(x|t|c)|in|ft|(m|c)m|k?Hz|deg|g?rad|m?s)</regex>
	</pattern-item>
	
	<!--
		For values like: z-index: 2;
		+/- before 0 is not allowed.
	-->
	<pattern-item _name="Number" style="Decimal">
		<regex>\b(0|[\+-]?[1-9][0-9]*)</regex>
	</pattern-item>
	
	<!--
		Unicode range values.
	-->	
	<pattern-item _name="Unicode Range" style="Others 2">
		<regex>[uU]\+[a-fA-F0-9]{1,6}(-[a-fA-F0-9]{1,6})?</regex>
	</pattern-item>
	
	<!--
		Upgrades a rule set's importance when several rule sets conflict.
	-->
	<pattern-item _name="Importance Modifier" style="Specials">
		<regex>\![ \t]*important</regex>
	</pattern-item>
	
	<keyword-list _name="Property Names" style="Keyword" case-sensitive="FALSE">
		<keyword>azimuth</keyword>
		<keyword>background</keyword>
		<keyword>background-attachment</keyword>
		<keyword>background-color</keyword>
		<keyword>background-image</keyword>
		<keyword>background-position</keyword>
		<keyword>background-repeat</keyword>
		<keyword>border</keyword>
		<keyword>border-collapse</keyword>
		<keyword>border-color</keyword>
		<keyword>border-spacing</keyword>
		<keyword>border-style</keyword>
		<keyword>border-top</keyword>
		<keyword>border-right</keyword>
		<keyword>border-bottom</keyword>
		<keyword>border-left</keyword>
		<keyword>border-top-color</keyword>
		<keyword>border-right-color</keyword>
		<keyword>border-bottom-color</keyword>
		<keyword>border-left-color</keyword>
		<keyword>border-top-style</keyword>
		<keyword>border-right-style</keyword>
		<keyword>border-bottom-style</keyword>
		<keyword>border-left-style</keyword>
		<keyword>border-top-width</keyword>
		<keyword>border-right-width</keyword>
		<keyword>border-bottom-width</keyword>
		<keyword>border-left-width</keyword>
		<keyword>border-width</keyword>
		<keyword>bottom</keyword>
		<keyword>caption-side</keyword>
		<keyword>clear</keyword>
		<keyword>clip</keyword>
		<keyword>color</keyword>
		<keyword>content</keyword>
		<keyword>counter-increment</keyword>
		<keyword>counter-reset</keyword>
		<keyword>cue</keyword>
		<keyword>cue-after</keyword>
		<keyword>cue-before</keyword>
		<keyword>cursor</keyword>
		<keyword>direction</keyword>
		<keyword>display</keyword>
		<keyword>elevation</keyword>
		<keyword>empty-cells</keyword>
		<keyword>float</keyword>
		<keyword>font</keyword>		
		<keyword>font-family</keyword>
		<keyword>font-size</keyword>
		<keyword>font-size-adjust</keyword>
		<keyword>font-style</keyword>
		<keyword>font-variant</keyword>
		<keyword>font-weight</keyword>
		<keyword>height</keyword>
		<keyword>left</keyword>
		<keyword>letter-spacing</keyword>
		<keyword>line-height</keyword>
		<keyword>list-style</keyword>
		<keyword>list-style-image</keyword>
		<keyword>list-style-position</keyword>
		<keyword>list-style-type</keyword>
		<keyword>margin</keyword>
		<keyword>margin-top</keyword>
		<keyword>margin-right</keyword>
		<keyword>margin-bottom</keyword>
		<keyword>margin-left</keyword>
		<keyword>marker-offset</keyword>
		<keyword>marks</keyword>
		<keyword>max-height</keyword>
		<keyword>max-width</keyword>
		<keyword>min-height</keyword>
		<keyword>min-width</keyword>
		<keyword>orphans</keyword>
		<keyword>outline</keyword>
		<keyword>outline-color</keyword>
		<keyword>outline-style</keyword>
		<keyword>outline-width</keyword>
		<keyword>overflow</keyword>
		<keyword>padding</keyword>
		<keyword>padding-top</keyword>
		<keyword>padding-right</keyword>
		<keyword>padding-bottom</keyword>
		<keyword>padding-left</keyword>
		<keyword>page</keyword>
		<keyword>page-break-after</keyword>
		<keyword>page-break-before</keyword>
		<keyword>page-break-inside</keyword>
		<keyword>pause</keyword>
		<keyword>pause-after</keyword>
		<keyword>pause-before</keyword>
		<keyword>pitch</keyword>
		<keyword>pitch-range</keyword>
		<keyword>play-during</keyword>
		<keyword>position</keyword>
		<keyword>quotes</keyword>
		<keyword>richness</keyword>
		<keyword>right</keyword>
		<keyword>size</keyword>
		<keyword>speak</keyword>
		<keyword>speak-header</keyword>
		<keyword>speak-numerical</keyword>
		<keyword>speak-punctuation</keyword>
		<keyword>speech-rate</keyword>
		<keyword>stress</keyword>
		<keyword>table-layout</keyword>
		<keyword>text-align</keyword>
		<keyword>text-decoration</keyword>
		<keyword>text-indent</keyword>
		<keyword>text-shadow</keyword>
		<keyword>text-transform</keyword>
		<keyword>top</keyword>
		<keyword>unicode-bidi</keyword>
		<keyword>vertical-align</keyword>
		<keyword>visibility</keyword>
		<keyword>voice-family</keyword>
		<keyword>volume</keyword>
		<keyword>white-space</keyword>
		<keyword>widows</keyword>
		<keyword>width</keyword>
		<keyword>word-spacing</keyword>
		<keyword>z-index</keyword>
	</keyword-list>
	
	<keyword-list _name="Known Property Values" style="Data Type" case-sensitive="FALSE">
		<keyword>auto</keyword>
		<keyword>none</keyword>
		<keyword>inherit</keyword>
		<keyword>transparent</keyword>
		<keyword>hidden</keyword>
		<keyword>left</keyword>
		<keyword>right</keyword>
		<keyword>top</keyword>
		<keyword>bottom</keyword>
		<keyword>center</keyword>		
		<keyword>left-side</keyword>
		<keyword>far-left</keyword>
		<keyword>center-left</keyword>
		<keyword>center-right</keyword>
		<keyword>far-right</keyword>
		<keyword>right-side</keyword>
		<keyword>behind</keyword>
		<keyword>leftwards</keyword>
		<keyword>rightwards</keyword>
		<keyword>aqua</keyword>
		<keyword>black</keyword>
		<keyword>blue</keyword>
		<keyword>fuchsia</keyword>
		<keyword>gray</keyword>
		<keyword>green</keyword>
		<keyword>lime</keyword>
		<keyword>maroon</keyword>
		<keyword>navy</keyword>
		<keyword>olive</keyword>
		<keyword>purple</keyword>
		<keyword>red</keyword>
		<keyword>silver</keyword>
		<keyword>teal</keyword>
		<keyword>white</keyword>
		<keyword>yellow</keyword>
		<keyword>repeat</keyword>
		<keyword>repeat-x</keyword>
		<keyword>repeat-y</keyword>
		<keyword>no-repeat</keyword>
		<keyword>scroll</keyword>
		<keyword>fixed</keyword>
		<keyword>thin</keyword>
		<keyword>medium</keyword>
		<keyword>thick</keyword>
		<keyword>dotted</keyword>
		<keyword>dashed</keyword>
		<keyword>solid</keyword>
		<keyword>double</keyword>
		<keyword>groove</keyword>
		<keyword>ridge</keyword>
		<keyword>inset</keyword>
		<keyword>outset</keyword>
		<keyword>collapse</keyword>
		<keyword>separate</keyword>
		<keyword>open-quote</keyword>
		<keyword>close-quote</keyword>
		<keyword>no-open-quote</keyword>
		<keyword>no-close-quote</keyword>
		<keyword>cue-before</keyword>
		<keyword>cue-after</keyword>
		<keyword>crosshair</keyword>
		<keyword>default</keyword>
		<keyword>pointer</keyword>
		<keyword>move</keyword>
		<keyword>e-resize</keyword>
		<keyword>ne-resize</keyword>
		<keyword>nw-resize</keyword>
		<keyword>n-resize</keyword>
		<keyword>se-resize</keyword>
		<keyword>sw-resize</keyword>
		<keyword>s-resize</keyword>
		<keyword>w-resize</keyword>
		<keyword>text</keyword>
		<keyword>wait</keyword>
		<keyword>help</keyword>
		<keyword>ltr</keyword>
		<keyword>rlt</keyword>
		<keyword>inline</keyword>
		<keyword>block</keyword>
		<keyword>list-item</keyword>
		<keyword>run-in</keyword>
		<keyword>compact</keyword>
		<keyword>marker</keyword>
		<keyword>table</keyword>
		<keyword>inline-table</keyword>
		<keyword>table-row-group</keyword>
		<keyword>table-header-group</keyword>
		<keyword>table-footer-group</keyword>
		<keyword>table-row</keyword>
		<keyword>table-column-group</keyword>
		<keyword>table-column</keyword>
		<keyword>table-cell</keyword>
		<keyword>table-caption</keyword>
		<keyword>below</keyword>
		<keyword>level</keyword>
		<keyword>above</keyword>
		<keyword>higher</keyword>
		<keyword>lower</keyword>
		<keyword>show</keyword>
		<keyword>hide</keyword>
		<keyword>normal</keyword>
		<keyword>italic</keyword>
		<keyword>oblique</keyword>
		<keyword>small-caps</keyword>
		<keyword>bold</keyword>
		<keyword>bolder</keyword>
		<keyword>lighter</keyword>
		<keyword>wider</keyword>
		<keyword>narrower</keyword>
		<keyword>ultra-condensed</keyword>
		<keyword>extra-condensed</keyword>
		<keyword>condensed</keyword>
		<keyword>semi-condensed</keyword>
		<keyword>semi-expanded</keyword>
		<keyword>expanded</keyword>
		<keyword>extra-expanded</keyword>
		<keyword>ultra-expanded</keyword>
		<keyword>inside</keyword>
		<keyword>outside</keyword>
		<keyword>disc</keyword>
		<keyword>circle</keyword>
		<keyword>square</keyword>
		<keyword>decimal</keyword>
		<keyword>decimal-leading-zero</keyword>
		<keyword>lower-roman</keyword>
		<keyword>upper-roman</keyword>
		<keyword>lower-greek</keyword>
		<keyword>lower-alpha</keyword>
		<keyword>lower-latin</keyword>
		<keyword>upper-alpha</keyword>
		<keyword>upper-latin</keyword>
		<keyword>hebrew</keyword>
		<keyword>armenian</keyword>
		<keyword>georgian</keyword>
		<keyword>cjk-ideographic</keyword>
		<keyword>hiragana</keyword>
		<keyword>katakana</keyword>
		<keyword>hiragana-iroha</keyword>
		<keyword>katakana-iroha</keyword>
		<keyword>crop</keyword>
		<keyword>cross</keyword>
		<keyword>invert</keyword>
		<keyword>visible</keyword>
		<keyword>scroll</keyword>
		<keyword>always</keyword>
		<keyword>avoid</keyword>
		<keyword>x-low</keyword>
		<keyword>low</keyword>
		<keyword>medium</keyword>
		<keyword>high</keyword>
		<keyword>x-high</keyword>
		<keyword>mix</keyword>
		<keyword>repeat</keyword>
		<keyword>static</keyword>
		<keyword>relative</keyword>
		<keyword>absolute</keyword>
		<keyword>fixed</keyword>
		<keyword>portait</keyword>
		<keyword>landscape</keyword>
		<keyword>spell-out</keyword>
		<keyword>once</keyword>
		<keyword>digits</keyword>
		<keyword>continuous</keyword>
		<keyword>code</keyword>
		<keyword>x-slow</keyword>
		<keyword>slow</keyword>
		<keyword>fast</keyword>
		<keyword>x-fast</keyword>
		<keyword>faster</keyword>
		<keyword>slower</keyword>
		<keyword>justify</keyword>
		<keyword>underline</keyword>
		<keyword>overline</keyword>
		<keyword>line-through</keyword>
		<keyword>blink</keyword>
		<keyword>capitalize</keyword>
		<keyword>uppercase</keyword>
		<keyword>lowercase</keyword>
		<keyword>embed</keyword>
		<keyword>bidi-override</keyword>
		<keyword>baseline</keyword>
		<keyword>sub</keyword>
		<keyword>super</keyword>
		<keyword>top</keyword>
		<keyword>text-top</keyword>
		<keyword>middle</keyword>
		<keyword>text-bottom</keyword>
		<keyword>silent</keyword>
		<keyword>x-soft</keyword>
		<keyword>soft</keyword>
		<keyword>loud</keyword>
		<keyword>x-loud</keyword>
		<keyword>pre</keyword>
		<keyword>nowrap</keyword>
		<keyword>smaller</keyword>
		<keyword>larger</keyword>
		<keyword>xx-small</keyword>
		<keyword>x-small</keyword>
		<keyword>small</keyword>
		<keyword>large</keyword>
		<keyword>x-large</keyword>
		<keyword>xx-large</keyword>
		<keyword>serif</keyword>
		<keyword>sans-serif</keyword>
		<keyword>cursive</keyword>
		<keyword>fantasy</keyword>
		<keyword>monospace</keyword>										
	</keyword-list>
</language>
