annotate runtime/syntax/css.vim @ 2616:73d947c20291 v7.3.038

updated for version 7.3.038 Problem: v:windowid isn't set on MS-Windows. Solution: Set it to the window handle. (Chris Sutcliffe)
author Bram Moolenaar <bram@vim.org>
date Wed, 27 Oct 2010 12:33:17 +0200
parents c0e675a3e363
children 8b8ef1fed009
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Cascading Style Sheets
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Claudio Fleiner <claudio@fleiner.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.fleiner.com/vim/syntax/css.vim
2421
c0e675a3e363 Minor runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 1624
diff changeset
5 " Last Change: 2010 Jul 28
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " CSS2 by Nikolai Weibull
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Full CSS2, HTML4 support by Yeti
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 let main_syntax = 'css'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword cssTagName abbr acronym address applet area a b base
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword cssTagName basefont bdo big blockquote body br button
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword cssTagName caption center cite code col colgroup dd del
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword cssTagName dfn dir div dl dt em fieldset font form frame
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword cssTagName iframe img input ins isindex kbd label legend li
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword cssTagName link map menu meta noframes noscript ol optgroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword cssTagName option p param pre q s samp script select small
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword cssTagName span strike strong style sub sup tbody td
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword cssTagName textarea tfoot th thead title tr tt ul u var
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match cssTagName "\<table\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match cssTagName "\*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match cssTagName "@page\>" nextgroup=cssDefinition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match cssSelectorOp "[+>.]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match cssSelectorOp2 "[~|]\?=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
557
862863033fdd updated for version 7.0158
vimboss
parents: 36
diff changeset
41 try
36
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
42 syn match cssIdentifier "#[A-Za-zĄ-’_@][A-Za-zĄ-’0-9_@-]*"
557
862863033fdd updated for version 7.0158
vimboss
parents: 36
diff changeset
43 catch /^.*/
862863033fdd updated for version 7.0158
vimboss
parents: 36
diff changeset
44 syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
862863033fdd updated for version 7.0158
vimboss
parents: 36
diff changeset
45 endtry
862863033fdd updated for version 7.0158
vimboss
parents: 36
diff changeset
46
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match cssValueInteger contained "[-+]\=\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword cssFontDescriptorAttr contained all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match cssUnicodeRange contained "U+\x\+-\x\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " FIXME: These are actually case-insentivie too, but (a) specs recommend using
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " mixed-case (b) it's hard to highlight the word `Background' correctly in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " all situations
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match cssColor contained "\<transparent\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match cssColor contained "\<white\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 "syn match cssColor contained "\<rgb\s*(\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" oneline keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\)\s*(" end=")" oneline keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match cssImportant contained "!\s*important\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword cssCommonAttr contained auto none inherit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword cssCommonAttr contained top bottom
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword cssCommonAttr contained medium normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
2421
c0e675a3e363 Minor runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 1624
diff changeset
90 syn match cssFontProp contained "\<font\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\)\=\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match cssFontAttr contained "\<\(sans-\)\=\<serif\>"
2421
c0e675a3e363 Minor runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 1624
diff changeset
92 syn match cssFontAttr contained "\<small\(-\(caps\|caption\)\)\=\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match cssFontAttr contained "\<x\{1,2\}-\(large\|small\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match cssFontAttr contained "\<message-box\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match cssFontAttr contained "\<status-bar\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword cssFontAttr contained cursive fantasy monospace italic oblique
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword cssFontAttr contained bold bolder lighter larger smaller
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword cssFontAttr contained icon menu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match cssFontAttr contained "\<caption\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword cssFontAttr contained large smaller larger
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword cssFontAttr contained narrower wider
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn keyword cssColorProp contained color
2421
c0e675a3e363 Minor runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 1624
diff changeset
105 syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\=\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn keyword cssColorAttr contained center scroll fixed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match cssColorAttr contained "\<repeat\(-[xy]\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match cssColorAttr contained "\<no-repeat\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match cssTextAttr contained "\<line-through\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn match cssTextAttr contained "\<text-indent\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn keyword cssTextAttr contained underline overline blink sub super middle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn match cssBoxProp contained "\<border-\(\(\(top\|right\|bottom\|left\)-\)\=\(width\|color\|style\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn match cssBoxProp contained "\<\(width\|z-index\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn keyword cssBoxProp contained width height float clear overflow clip visibility
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn keyword cssBoxAttr contained thin thick both
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn keyword cssBoxAttr contained hidden visible scroll collapse
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn keyword cssGeneratedContentProp contained content quotes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn match cssGeneratedContentProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syn match cssAuralAttr contained "\<lower\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 syn keyword cssGeneratedContentAttr contained inside outside
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn match cssPagingProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn keyword cssPagingProp contained size marks inside orphans widows
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 syn keyword cssPagingAttr contained landscape portrait crop cross always avoid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 syn keyword cssUIProp contained cursor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 syn match cssUIProp contained "\<outline\(-\(width\|style\|color\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 syn keyword cssUIAttr contained default crosshair pointer move wait help
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 syn keyword cssUIAttr contained thin thick
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 syn keyword cssUIAttr contained invert
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 syn match cssRenderAttr contained "\<marker\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 syn keyword cssRenderProp contained position top bottom direction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 syn match cssRenderProp contained "\<\(left\|right\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 syn keyword cssRenderAttr contained block inline compact
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 syn match cssRenderAttr contained "\<table\(-\(row-gorup\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 syn keyword cssRenderAttr contained static relative absolute fixed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 syn match cssRenderAttr contained "\<bidi-override\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 syn keyword cssAuralProp contained volume during azimuth elevation stress richness
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 syn keyword cssAuralAttr contained silent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 syn match cssAuralAttr contained "\<spell-out\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 syn keyword cssAuralAttr contained non mix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 syn match cssAuralAttr contained "\<\(left\|right\)-side\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 syn keyword cssAuralAttr contained leftwards rightwards behind
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 syn keyword cssAuralAttr contained below level above higher
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 syn keyword cssAuralAttr contained faster slower
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 syn keyword cssAuralAttr contained male female child code digits continuous
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 syn keyword cssTableAttr contained fixed collapse separate show hide once always
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 " FIXME: This allows cssMediaBlock before the semicolon, which is wrong.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 syn match cssBraces contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 syn match cssError contained "{@<>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 syn match cssBraceError "}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 syn match cssPseudoClass ":\S*" contains=cssPseudoClassId,cssUnicodeEscape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 syn keyword cssPseudoClassId contained link visited active hover focus before after left right
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189
1285
463e25d28b33 updated for version 7.1
vimboss
parents: 557
diff changeset
190 syn region cssComment start="/\*" end="\*/" contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 syn match cssUnicodeEscape "\\\x\{1,6}\s\?"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 syn match cssSpecialCharQQ +\\"+ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 syn match cssSpecialCharQ +\\'+ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1285
diff changeset
197 syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 if main_syntax == "css"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 syn sync minlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 if version >= 508 || !exists("did_css_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 let did_css_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 HiLink cssComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 HiLink cssTagName Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 HiLink cssSelectorOp Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 HiLink cssSelectorOp2 Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 HiLink cssFontProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 HiLink cssColorProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 HiLink cssTextProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 HiLink cssBoxProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 HiLink cssRenderProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 HiLink cssAuralProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 HiLink cssRenderProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 HiLink cssGeneratedContentProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 HiLink cssPagingProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 HiLink cssTableProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 HiLink cssUIProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 HiLink cssFontAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 HiLink cssColorAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 HiLink cssTextAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 HiLink cssBoxAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 HiLink cssRenderAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 HiLink cssAuralAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 HiLink cssGeneratedContentAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 HiLink cssPagingAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 HiLink cssTableAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 HiLink cssUIAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 HiLink cssCommonAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 HiLink cssPseudoClassId PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 HiLink cssPseudoClassLang Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 HiLink cssValueLength Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 HiLink cssValueInteger Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 HiLink cssValueNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 HiLink cssValueAngle Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 HiLink cssValueTime Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 HiLink cssValueFrequency Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 HiLink cssFunction Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 HiLink cssURL String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 HiLink cssFunctionName Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 HiLink cssColor Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 HiLink cssIdentifier Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 HiLink cssInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 HiLink cssImportant Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 HiLink cssBraces Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 HiLink cssBraceError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 HiLink cssError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 HiLink cssInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 HiLink cssUnicodeEscape Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 HiLink cssStringQQ String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 HiLink cssStringQ String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 HiLink cssMedia Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 HiLink cssMediaType Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 HiLink cssMediaComma Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 HiLink cssFontDescriptor Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 HiLink cssFontDescriptorFunction Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 HiLink cssFontDescriptorProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 HiLink cssFontDescriptorAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 HiLink cssUnicodeRange Constant
1285
463e25d28b33 updated for version 7.1
vimboss
parents: 557
diff changeset
270 HiLink cssClassName Function
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 let b:current_syntax = "css"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 if main_syntax == 'css'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279
557
862863033fdd updated for version 7.0158
vimboss
parents: 36
diff changeset
280
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 " vim: ts=8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282