Mercurial > vim
comparison runtime/syntax/css.vim @ 17909:cc953757ed2a
Runtime files update.
Commit: https://github.com/vim/vim/commit/06fe74aef72606ac34c9f494186e52614b8fb59a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 31 16:20:32 2019 +0200
Runtime files update.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 31 Aug 2019 16:30:04 +0200 |
parents | acd7eaa13d2b |
children | 1b345fb68ae3 |
comparison
equal
deleted
inserted
replaced
17908:d9ada976a4c0 | 17909:cc953757ed2a |
---|---|
4 " Claudio Fleiner <claudio@fleiner.com> (Maintainer) | 4 " Claudio Fleiner <claudio@fleiner.com> (Maintainer) |
5 " Yeti (Add full CSS2, HTML4 support) | 5 " Yeti (Add full CSS2, HTML4 support) |
6 " Nikolai Weibull (Add CSS2 support) | 6 " Nikolai Weibull (Add CSS2 support) |
7 " URL: https://github.com/JulesWang/css.vim | 7 " URL: https://github.com/JulesWang/css.vim |
8 " Maintainer: Jules Wang <w.jq0722@gmail.com> | 8 " Maintainer: Jules Wang <w.jq0722@gmail.com> |
9 " Last Change: 2018 Feb. 27 | 9 " Last Change: 2019 Jul. 29 |
10 " cssClassName updated by Ryuichi Hayashida Jan 2016 | |
11 | 10 |
12 " quit when a syntax file was already loaded | 11 " quit when a syntax file was already loaded |
13 if !exists("main_syntax") | 12 if !exists("main_syntax") |
14 if exists("b:current_syntax") | 13 if exists("b:current_syntax") |
15 finish | 14 finish |
67 endtry | 66 endtry |
68 | 67 |
69 " digits | 68 " digits |
70 syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators | 69 syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators |
71 syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators | 70 syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators |
72 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators | 71 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\|fr\|vw\|vh\|vmin\|vmax\)\>" contains=cssUnitDecorators |
73 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators | 72 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators |
74 syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators | 73 syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators |
75 syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators | 74 syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators |
76 syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators | 75 syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators |
77 | 76 |
112 syn case match | 111 syn case match |
113 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 | 112 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 |
114 syn case ignore | 113 syn case ignore |
115 | 114 |
116 syn match cssImportant contained "!\s*important\>" | 115 syn match cssImportant contained "!\s*important\>" |
116 syn match cssCustomProp contained "--[a-zA-Z0-9-_]*" | |
117 | 117 |
118 syn match cssColor contained "\<transparent\>" | 118 syn match cssColor contained "\<transparent\>" |
119 syn match cssColor contained "\<currentColor\>" | 119 syn match cssColor contained "\<currentColor\>" |
120 syn match cssColor contained "\<white\>" | 120 syn match cssColor contained "\<white\>" |
121 syn match cssColor contained "#\x\{3,4\}\>" contains=cssUnitDecorators | 121 syn match cssColor contained "#\x\{3,4\}\>" contains=cssUnitDecorators |
122 syn match cssColor contained "#\x\{6\}\>" contains=cssUnitDecorators | 122 syn match cssColor contained "#\x\{6\}\>" contains=cssUnitDecorators |
123 syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators | 123 syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators |
124 | 124 |
125 syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline | 125 syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline |
126 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline | |
126 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma | 127 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma |
127 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction | 128 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction |
128 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma | 129 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma |
129 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(matrix\(3d\)\=\|scale\(3d\|X\|Y\|Z\)\=\|translate\(3d\|X\|Y\|Z\)\=\|skew\(X\|Y\)\=\|rotate\(3d\|X\|Y\|Z\)\=\|perspective\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma | 130 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(matrix\(3d\)\=\|scale\(3d\|X\|Y\|Z\)\=\|translate\(3d\|X\|Y\|Z\)\=\|skew\(X\|Y\)\=\|rotate\(3d\|X\|Y\|Z\)\=\|perspective\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma |
130 syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at | 131 syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at |
190 syn match cssBoxProp contained "\<margin\(-\(top\|right\|bottom\|left\)\)\=\>" | 191 syn match cssBoxProp contained "\<margin\(-\(top\|right\|bottom\|left\)\)\=\>" |
191 syn match cssBoxProp contained "\<overflow\(-\(x\|y\|style\)\)\=\>" | 192 syn match cssBoxProp contained "\<overflow\(-\(x\|y\|style\)\)\=\>" |
192 syn match cssBoxProp contained "\<rotation\(-point\)\=\>" | 193 syn match cssBoxProp contained "\<rotation\(-point\)\=\>" |
193 syn keyword cssBoxAttr contained visible hidden scroll auto | 194 syn keyword cssBoxAttr contained visible hidden scroll auto |
194 syn match cssBoxAttr contained "\<no-\(display\|content\)\>" | 195 syn match cssBoxAttr contained "\<no-\(display\|content\)\>" |
196 | |
197 syn keyword cssCascadeProp contained all | |
198 syn keyword cssCascadeAttr contained initial unset revert | |
195 | 199 |
196 syn keyword cssColorProp contained opacity | 200 syn keyword cssColorProp contained opacity |
197 syn match cssColorProp contained "\<color-profile\>" | 201 syn match cssColorProp contained "\<color-profile\>" |
198 syn match cssColorProp contained "\<rendering-intent\>" | 202 syn match cssColorProp contained "\<rendering-intent\>" |
199 | 203 |
271 syn match cssGeneratedContentProp contained "\<page-policy\>" | 275 syn match cssGeneratedContentProp contained "\<page-policy\>" |
272 syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" | 276 syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" |
273 | 277 |
274 " https://www.w3.org/TR/css-grid-1/ | 278 " https://www.w3.org/TR/css-grid-1/ |
275 syn match cssGridProp contained "\<grid\>" | 279 syn match cssGridProp contained "\<grid\>" |
276 syn match cssGridProp contained "\<grid\(-\(template\|auto\)\)\=\(-\(columns\|rows\|areas\)\)\>" | 280 syn match cssGridProp contained "\<grid-template\(-\(columns\|rows\|areas\)\)\=\>" |
277 syn match cssGridProp contained "\<grid-\(column\|row\)\(-\(start\|end\|gap\)\)\=\>" | 281 syn match cssGridProp contained "\<grid-\(column\|row\)\(-\(start\|end\|gap\)\)\=\>" |
278 syn match cssGridProp contained "\<grid-\(area\|gap\)\>" | 282 syn match cssGridProp contained "\<grid-\(area\|gap\)\>" |
279 syn match cssGridProp contained "\<grid-auto-flow\>" | 283 syn match cssGridProp contained "\<grid-auto-\(flow\|rows\|columns\)\>" |
280 | 284 |
281 syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>" | 285 syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>" |
282 | 286 |
283 syn match cssListProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>" | 287 syn match cssListProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>" |
284 syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" | 288 syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" |
293 syn keyword cssPositioningAttr contained block compact grid | 297 syn keyword cssPositioningAttr contained block compact grid |
294 syn match cssPositioningAttr contained "\<table\(-\(row-group\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>" | 298 syn match cssPositioningAttr contained "\<table\(-\(row-group\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>" |
295 syn keyword cssPositioningAttr contained left right both | 299 syn keyword cssPositioningAttr contained left right both |
296 syn match cssPositioningAttr contained "\<list-item\>" | 300 syn match cssPositioningAttr contained "\<list-item\>" |
297 syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\|grid\|flex\)\)\=\>" | 301 syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\|grid\|flex\)\)\=\>" |
302 syn match cssPositioningAttr contained "\<flow\(-root\)\=\>" | |
298 syn keyword cssPositioningAttr contained static relative absolute fixed subgrid | 303 syn keyword cssPositioningAttr contained static relative absolute fixed subgrid |
299 | 304 |
300 syn keyword cssPrintAttr contained landscape portrait crop cross always | 305 syn keyword cssPrintAttr contained landscape portrait crop cross always |
301 | 306 |
302 syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>" | 307 syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>" |
303 syn keyword cssTableAttr contained fixed collapse separate show hide once always | 308 syn keyword cssTableAttr contained fixed collapse separate show hide once always |
304 | 309 |
305 | 310 |
306 syn keyword cssTextProp contained color direction | 311 syn keyword cssTextProp contained color direction hyphens |
307 syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>" | 312 syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>" |
308 syn match cssTextProp contained "\<text-\(justify\|outline\|warp\|align-last\|size-adjust\|rendering\|stroke\|indent\)\>" | 313 syn match cssTextProp contained "\<text-\(justify\|outline\|warp\|align-last\|size-adjust\|rendering\|stroke\|indent\)\>" |
309 syn match cssTextProp contained "\<word-\(break\|\wrap\)\>" | 314 syn match cssTextProp contained "\<\(word\|line\)-break\|\(overflow\|word\)-wrap\>" |
310 syn match cssTextProp contained "\<white-space\>" | 315 syn match cssTextProp contained "\<white-space\>" |
311 syn match cssTextProp contained "\<hanging-punctuation\>" | 316 syn match cssTextProp contained "\<hanging-punctuation\>" |
317 syn match cssTextProp contained "\<tab-size\>" | |
312 syn match cssTextProp contained "\<punctuation-trim\>" | 318 syn match cssTextProp contained "\<punctuation-trim\>" |
313 syn match cssTextAttr contained "\<line-through\>" | 319 syn match cssTextAttr contained "\<line-through\>" |
314 syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>" | 320 syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>" |
315 syn keyword cssTextAttr contained ltr rtl embed nowrap | 321 syn keyword cssTextAttr contained ltr rtl embed nowrap |
316 syn keyword cssTextAttr contained underline overline blink sub super middle | 322 syn keyword cssTextAttr contained underline overline blink sub super middle |
317 syn keyword cssTextAttr contained capitalize uppercase lowercase | 323 syn keyword cssTextAttr contained capitalize uppercase lowercase |
318 syn keyword cssTextAttr contained justify baseline sub super | 324 syn keyword cssTextAttr contained justify baseline sub super |
319 syn keyword cssTextAttr contained optimizeLegibility optimizeSpeed | 325 syn keyword cssTextAttr contained optimizeLegibility optimizeSpeed geometricPrecision |
320 syn match cssTextAttr contained "\<pre\(-\(line\|wrap\)\)\=\>" | 326 syn match cssTextAttr contained "\<pre\(-\(line\|wrap\)\)\=\>" |
321 syn match cssTextAttr contained "\<\(allow\|force\)-end\>" | 327 syn match cssTextAttr contained "\<\(allow\|force\)-end\>" |
322 syn keyword cssTextAttr contained start end adjacent | 328 syn keyword cssTextAttr contained start end adjacent |
323 syn match cssTextAttr contained "\<inter-\(word\|ideographic\|cluster\)\>" | 329 syn match cssTextAttr contained "\<inter-\(word\|ideographic\|cluster\)\>" |
324 syn keyword cssTextAttr contained distribute kashida first last | 330 syn keyword cssTextAttr contained distribute kashida first last |
325 syn keyword cssTextAttr contained clip ellipsis unrestricted suppress | 331 syn keyword cssTextAttr contained clip ellipsis unrestricted suppress |
326 syn match cssTextAttr contained "\<break-all\>" | 332 syn match cssTextAttr contained "\<break-all\>" |
327 syn match cssTextAttr contained "\<break-word\>" | 333 syn match cssTextAttr contained "\<break-word\>" |
328 syn keyword cssTextAttr contained hyphenate | 334 syn keyword cssTextAttr contained manual |
329 syn match cssTextAttr contained "\<bidi-override\>" | 335 syn match cssTextAttr contained "\<bidi-override\>" |
330 | 336 |
331 syn match cssTransformProp contained "\<transform\(-\(origin\|style\)\)\=\>" | 337 syn match cssTransformProp contained "\<transform\(-\(origin\|style\)\)\=\>" |
332 syn match cssTransformProp contained "\<perspective\(-origin\)\=\>" | 338 syn match cssTransformProp contained "\<perspective\(-origin\)\=\>" |
333 syn match cssTransformProp contained "\<backface-visibility\>" | 339 syn match cssTransformProp contained "\<backface-visibility\>" |
406 syn keyword cssAuralAttr contained male female child code digits continuous | 412 syn keyword cssAuralAttr contained male female child code digits continuous |
407 | 413 |
408 " mobile text | 414 " mobile text |
409 syn match cssMobileTextProp contained "\<text-size-adjust\>" | 415 syn match cssMobileTextProp contained "\<text-size-adjust\>" |
410 | 416 |
411 syn keyword cssMediaProp contained width height orientation scan grid | 417 syn keyword cssMediaProp contained width height orientation scan |
412 syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/ | 418 syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/ |
413 syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/ | 419 syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/ |
414 syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/ | 420 syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/ |
415 syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/ | 421 syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/ |
416 syn keyword cssMediaAttr contained portrait landscape progressive interlace | 422 syn keyword cssMediaAttr contained portrait landscape progressive interlace |
417 syn match cssKeyFrameProp /\d*%\|from\|to/ contained nextgroup=cssDefinition | 423 syn match cssKeyFrameProp contained /\(\d\+\(\.\d\+\)\?%\|\(\<from\|to\>\)\)/ nextgroup=cssDefinition |
418 syn match cssPageMarginProp /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition | 424 syn match cssPageMarginProp /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition |
419 syn keyword cssPageProp contained content size | 425 syn keyword cssPageProp contained content size |
420 syn keyword cssPageProp contained orphans widows | 426 syn keyword cssPageProp contained orphans widows |
421 syn keyword cssFontDescriptorProp contained src | 427 syn keyword cssFontDescriptorProp contained src |
422 syn match cssFontDescriptorProp contained "\<unicode-range\>" | 428 syn match cssFontDescriptorProp contained "\<unicode-range\>" |
424 syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+" | 430 syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+" |
425 syn match cssFontDescriptorAttr contained "U+\x\+-\x\+" | 431 syn match cssFontDescriptorAttr contained "U+\x\+-\x\+" |
426 | 432 |
427 syn match cssBraces contained "[{}]" | 433 syn match cssBraces contained "[{}]" |
428 syn match cssError contained "{@<>" | 434 syn match cssError contained "{@<>" |
429 syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssAttributeSelector,cssClassName,cssIdentifier,cssAtRule,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold | 435 syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssAttributeSelector,cssClassName,cssIdentifier,cssAtRule,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssCustomProp,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold |
430 syn match cssBraceError "}" | 436 syn match cssBraceError "}" |
431 syn match cssAttrComma "," | 437 syn match cssAttrComma "," |
432 | 438 |
433 " Pseudo class | 439 " Pseudo class |
434 " http://www.w3.org/TR/css3-selectors/ | 440 " http://www.w3.org/TR/css3-selectors/ |
435 syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssNoise,cssPseudoClassId,cssUnicodeEscape,cssVendor,cssPseudoClassFn | 441 syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssNoise,cssPseudoClassId,cssUnicodeEscape,cssVendor,cssPseudoClassFn |
436 syn keyword cssPseudoClassId contained link visited active hover before after left right | 442 syn keyword cssPseudoClassId contained link visited active hover before after left right |
437 syn keyword cssPseudoClassId contained root empty target enable disabled checked invalid | 443 syn keyword cssPseudoClassId contained root empty target enable disabled checked invalid |
438 syn match cssPseudoClassId contained "\<first-\(line\|letter\)\>" | 444 syn match cssPseudoClassId contained "\<first-\(line\|letter\)\>" |
439 syn match cssPseudoClassId contained "\<\(first\|last\|only\)-\(of-type\|child\)\>" | 445 syn match cssPseudoClassId contained "\<\(first\|last\|only\)-\(of-type\|child\)\>" |
440 syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(not\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" | 446 syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(not\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" contains=cssStringQ,cssStringQQ |
441 " ------------------------------------ | 447 " ------------------------------------ |
442 " Vendor specific properties | 448 " Vendor specific properties |
443 syn match cssPseudoClassId contained "\<selection\>" | 449 syn match cssPseudoClassId contained "\<selection\>" |
444 syn match cssPseudoClassId contained "\<focus\(-inner\)\=\>" | 450 syn match cssPseudoClassId contained "\<focus\(-inner\)\=\>" |
445 syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>" | 451 syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>" |
468 " http://www.paulirish.com/2009/browser-specific-css-hacks/ | 474 " http://www.paulirish.com/2009/browser-specific-css-hacks/ |
469 syn match cssHacks contained /\(_\|*\)/ | 475 syn match cssHacks contained /\(_\|*\)/ |
470 | 476 |
471 " Attr Enhance | 477 " Attr Enhance |
472 " Some keywords are both Prop and Attr, so we have to handle them | 478 " Some keywords are both Prop and Attr, so we have to handle them |
473 syn region cssAttrRegion start=/:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise | 479 " cssPseudoClassId is hidden by cssAttrRegion, so we add it here. see #69 |
480 syn region cssAttrRegion start=/:/ end=/\ze\(;\|)\|}\|{\)/ contained contains=cssPseudoClassId,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise | |
474 | 481 |
475 " Hack for transition | 482 " Hack for transition |
476 " 'transition' has Props after ':'. | 483 " 'transition' has Props after ':'. |
477 syn region cssAttrRegion start=/transition\s*:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise | 484 syn region cssAttrRegion start=/transition\s*:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise |
478 | 485 |
479 syn match cssAtKeyword /@\(font-face\|media\|keyframes\|import\|charset\|namespace\|page\|supports\)/ contained | 486 syn match cssAtKeyword /@\(font-face\|media\|keyframes\|import\|charset\|namespace\|page\|supports\)/ |
480 | 487 |
481 syn keyword cssAtRuleLogical only not and contained | 488 syn keyword cssAtRuleLogical only not and contained |
482 | 489 |
483 " @media | 490 " @media |
484 " Reference: http://www.w3.org/TR/css3-mediaqueries/ | 491 " Reference: http://www.w3.org/TR/css3-mediaqueries/ |
485 syn region cssAtRule start=/@media\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssComment nextgroup=cssDefinition | 492 syn region cssAtRule start=/@media\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssComment,cssCustomProp,cssFunctionName nextgroup=cssDefinition |
486 syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained | 493 syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained |
487 | 494 |
488 " @page | 495 " @page |
489 " http://www.w3.org/TR/css3-page/ | 496 " http://www.w3.org/TR/css3-page/ |
490 syn region cssAtRule start=/@page\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssPagePseudo,cssComment nextgroup=cssDefinition | 497 syn region cssAtRule start=/@page\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssPagePseudo,cssComment nextgroup=cssDefinition |
495 | 502 |
496 syn region cssAtRule start=/@import\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword,cssURL,cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssMediaType | 503 syn region cssAtRule start=/@import\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword,cssURL,cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssMediaType |
497 syn region cssAtRule start=/@charset\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword | 504 syn region cssAtRule start=/@charset\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword |
498 syn region cssAtRule start=/@namespace\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword | 505 syn region cssAtRule start=/@namespace\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword |
499 | 506 |
500 " @font-face | |
501 " http://www.w3.org/TR/css3-fonts/#at-font-face-rule | |
502 syn match cssAtRule "@font-face\>" nextgroup=cssFontDescriptorBlock | |
503 " @supports | 507 " @supports |
504 " https://www.w3.org/TR/css3-conditional/#at-supports | 508 " https://www.w3.org/TR/css3-conditional/#at-supports |
505 syn region cssAtRule start=/@supports\>/ end=/\ze{/ skipwhite skipnl contains=cssAtRuleLogical,cssAttrRegion,css.*Prop,cssValue.*,cssVendor,cssAtKeyword,cssComment nextgroup=cssDefinition | 509 syn region cssAtRule start=/@supports\>/ end=/\ze{/ skipwhite skipnl contains=cssAtRuleLogical,cssAttrRegion,css.*Prop,cssValue.*,cssVendor,cssAtKeyword,cssComment nextgroup=cssDefinition |
506 | 510 |
507 | 511 |
523 | 527 |
524 hi def link cssAnimationProp cssProp | 528 hi def link cssAnimationProp cssProp |
525 hi def link cssBackgroundProp cssProp | 529 hi def link cssBackgroundProp cssProp |
526 hi def link cssBorderProp cssProp | 530 hi def link cssBorderProp cssProp |
527 hi def link cssBoxProp cssProp | 531 hi def link cssBoxProp cssProp |
532 hi def link cssCascadeProp cssProp | |
528 hi def link cssColorProp cssProp | 533 hi def link cssColorProp cssProp |
529 hi def link cssContentForPagedMediaProp cssProp | 534 hi def link cssContentForPagedMediaProp cssProp |
530 hi def link cssDimensionProp cssProp | 535 hi def link cssDimensionProp cssProp |
531 hi def link cssFlexibleBoxProp cssProp | 536 hi def link cssFlexibleBoxProp cssProp |
532 hi def link cssFontProp cssProp | 537 hi def link cssFontProp cssProp |
583 hi def link cssTransitionAttr cssAttr | 588 hi def link cssTransitionAttr cssAttr |
584 hi def link cssUIAttr cssAttr | 589 hi def link cssUIAttr cssAttr |
585 hi def link cssIEUIAttr cssAttr | 590 hi def link cssIEUIAttr cssAttr |
586 hi def link cssAuralAttr cssAttr | 591 hi def link cssAuralAttr cssAttr |
587 hi def link cssRenderAttr cssAttr | 592 hi def link cssRenderAttr cssAttr |
593 hi def link cssCascadeAttr cssAttr | |
588 hi def link cssCommonAttr cssAttr | 594 hi def link cssCommonAttr cssAttr |
589 | 595 |
590 hi def link cssPseudoClassId PreProc | 596 hi def link cssPseudoClassId PreProc |
591 hi def link cssPseudoClassLang Constant | 597 hi def link cssPseudoClassLang Constant |
592 hi def link cssValueLength Number | 598 hi def link cssValueLength Number |
602 hi def link cssColor Constant | 608 hi def link cssColor Constant |
603 hi def link cssIdentifier Function | 609 hi def link cssIdentifier Function |
604 hi def link cssAtRule Include | 610 hi def link cssAtRule Include |
605 hi def link cssAtKeyword PreProc | 611 hi def link cssAtKeyword PreProc |
606 hi def link cssImportant Special | 612 hi def link cssImportant Special |
613 hi def link cssCustomProp Special | |
607 hi def link cssBraces Function | 614 hi def link cssBraces Function |
608 hi def link cssBraceError Error | 615 hi def link cssBraceError Error |
609 hi def link cssError Error | 616 hi def link cssError Error |
610 hi def link cssUnicodeEscape Special | 617 hi def link cssUnicodeEscape Special |
611 hi def link cssStringQQ String | 618 hi def link cssStringQQ String |