annotate runtime/syntax/css.vim @ 419:f713fc55bf7b v7.0109

updated for version 7.0109
author vimboss
date Mon, 18 Jul 2005 21:58:11 +0000
parents 125e80798a85
children 862863033fdd
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
36
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
5 " Last Change: 2004 Mar 30
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
36
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
41 syn match cssIdentifier "#[A-Za-zĄ-’_@][A-Za-zĄ-’0-9_@-]*"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 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
45 syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 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
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match cssValueInteger contained "[-+]\=\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 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
57 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
58 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
59 syn keyword cssFontDescriptorAttr contained all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 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
61 syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match cssUnicodeRange contained "U+\x\+-\x\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 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
65 " FIXME: These are actually case-insentivie too, but (a) specs recommend using
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " mixed-case (b) it's hard to highlight the word `Background' correctly in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " all situations
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 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
70 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match cssColor contained "\<transparent\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match cssColor contained "\<white\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 "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
76 syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" oneline keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 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
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match cssImportant contained "!\s*important\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword cssCommonAttr contained auto none inherit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword cssCommonAttr contained top bottom
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword cssCommonAttr contained medium normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match cssFontProp contained "\<font\>\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\>\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match cssFontAttr contained "\<\(sans-\)\=\<serif\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match cssFontAttr contained "\<small\>\(-\(caps\|caption\)\>\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match cssFontAttr contained "\<x\{1,2\}-\(large\|small\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match cssFontAttr contained "\<message-box\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match cssFontAttr contained "\<status-bar\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn keyword cssFontAttr contained cursive fantasy monospace italic oblique
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn keyword cssFontAttr contained bold bolder lighter larger smaller
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn keyword cssFontAttr contained icon menu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match cssFontAttr contained "\<caption\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn keyword cssFontAttr contained large smaller larger
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword cssFontAttr contained narrower wider
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword cssColorProp contained color
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword cssColorAttr contained center scroll fixed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match cssColorAttr contained "\<repeat\(-[xy]\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match cssColorAttr contained "\<no-repeat\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 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
106 syn match cssTextAttr contained "\<line-through\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match cssTextAttr contained "\<text-indent\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn keyword cssTextAttr contained underline overline blink sub super middle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn match cssBoxProp contained "\<border-\(\(\(top\|right\|bottom\|left\)-\)\=\(width\|color\|style\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn match cssBoxProp contained "\<\(width\|z-index\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn keyword cssBoxProp contained width height float clear overflow clip visibility
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn keyword cssBoxAttr contained thin thick both
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn keyword cssBoxAttr contained hidden visible scroll collapse
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn keyword cssGeneratedContentProp contained content quotes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn match cssGeneratedContentProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn match cssAuralAttr contained "\<lower\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syn keyword cssGeneratedContentAttr contained inside outside
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 syn match cssPagingProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn keyword cssPagingProp contained size marks inside orphans widows
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 syn keyword cssPagingAttr contained landscape portrait crop cross always avoid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 syn keyword cssUIProp contained cursor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn match cssUIProp contained "\<outline\(-\(width\|style\|color\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 syn keyword cssUIAttr contained default crosshair pointer move wait help
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 syn keyword cssUIAttr contained thin thick
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 syn keyword cssUIAttr contained invert
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 syn match cssRenderAttr contained "\<marker\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 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
146 syn keyword cssRenderProp contained position top bottom direction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 syn match cssRenderProp contained "\<\(left\|right\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 syn keyword cssRenderAttr contained block inline compact
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 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
150 syn keyword cssRenderAttr contained static relative absolute fixed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 syn match cssRenderAttr contained "\<bidi-override\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 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
157 syn keyword cssAuralProp contained volume during azimuth elevation stress richness
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 syn keyword cssAuralAttr contained silent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 syn match cssAuralAttr contained "\<spell-out\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 syn keyword cssAuralAttr contained non mix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 syn match cssAuralAttr contained "\<\(left\|right\)-side\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 syn keyword cssAuralAttr contained leftwards rightwards behind
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 syn keyword cssAuralAttr contained below level above higher
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 syn keyword cssAuralAttr contained faster slower
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 syn keyword cssAuralAttr contained male female child code digits continuous
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 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
171 syn keyword cssTableAttr contained fixed collapse separate show hide once always
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 " FIXME: This allows cssMediaBlock before the semicolon, which is wrong.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 syn match cssBraces contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 syn match cssError contained "{@<>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 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
178 syn match cssBraceError "}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 syn match cssPseudoClass ":\S*" contains=cssPseudoClassId,cssUnicodeEscape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 syn keyword cssPseudoClassId contained link visited active hover focus before after left right
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 syn region cssComment start="/\*" end="\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 syn match cssUnicodeEscape "\\\x\{1,6}\s\?"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 syn match cssSpecialCharQQ +\\"+ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 syn match cssSpecialCharQ +\\'+ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 if main_syntax == "css"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 syn sync minlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 " 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
200 if version >= 508 || !exists("did_css_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 let did_css_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 HiLink cssComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 HiLink cssTagName Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 HiLink cssSelectorOp Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 HiLink cssSelectorOp2 Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 HiLink cssFontProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 HiLink cssColorProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 HiLink cssTextProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 HiLink cssBoxProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 HiLink cssRenderProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 HiLink cssAuralProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 HiLink cssRenderProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 HiLink cssGeneratedContentProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 HiLink cssPagingProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 HiLink cssTableProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 HiLink cssUIProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 HiLink cssFontAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 HiLink cssColorAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 HiLink cssTextAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 HiLink cssBoxAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 HiLink cssRenderAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 HiLink cssAuralAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 HiLink cssGeneratedContentAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 HiLink cssPagingAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 HiLink cssTableAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 HiLink cssUIAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 HiLink cssCommonAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 HiLink cssPseudoClassId PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 HiLink cssPseudoClassLang Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 HiLink cssValueLength Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 HiLink cssValueInteger Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 HiLink cssValueNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 HiLink cssValueAngle Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 HiLink cssValueTime Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 HiLink cssValueFrequency Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 HiLink cssFunction Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 HiLink cssURL String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 HiLink cssFunctionName Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 HiLink cssColor Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 HiLink cssIdentifier Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 HiLink cssInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 HiLink cssImportant Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 HiLink cssBraces Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 HiLink cssBraceError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 HiLink cssError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 HiLink cssInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 HiLink cssUnicodeEscape Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 HiLink cssStringQQ String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 HiLink cssStringQ String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 HiLink cssMedia Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 HiLink cssMediaType Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 HiLink cssMediaComma Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 HiLink cssFontDescriptor Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 HiLink cssFontDescriptorFunction Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 HiLink cssFontDescriptorProp StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 HiLink cssFontDescriptorAttr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 HiLink cssUnicodeRange Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 let b:current_syntax = "css"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 if main_syntax == 'css'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 " vim: ts=8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274