Mercurial > ec-dotfiles
comparison vendor/vim-syntax/css.vim @ 661:c74dffea6a0a
[vim-syntax] Update syntax
author | nanaya <me@nanaya.pro> |
---|---|
date | Fri, 10 Dec 2021 19:02:27 +0900 |
parents | a6bbbee07a3a |
children | 6cdd7d26260d |
comparison
equal
deleted
inserted
replaced
660:56ac9d97d81b | 661:c74dffea6a0a |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Cascading Style Sheets | 2 " Language: Cascading Style Sheets |
3 " Previous Contributor List: | 3 " Previous Contributor List: |
4 " Jules Wang <w.jq0722@gmail.com> | 4 " Jules Wang <w.jq0722@gmail.com> |
5 " Claudio Fleiner <claudio@fleiner.com> (Maintainer) | 5 " Claudio Fleiner <claudio@fleiner.com> |
6 " Yeti (Add full CSS2, HTML4 support) | 6 " Yeti (Add full CSS2, HTML4 support) |
7 " Nikolai Weibull (Add CSS2 support) | 7 " Nikolai Weibull (Add CSS2 support) |
8 " URL: https://github.com/jsit/css.vim | 8 " URL: https://github.com/vim-language-dept/css-syntax.vim |
9 " Maintainer: Jay Sitter <jay@jaysitter.com> | 9 " Maintainer: Jay Sitter <jay@jaysitter.com> |
10 " Last Change: 2019 Jul. 29 | 10 " Last Change: 2021 Oct 15 |
11 | 11 |
12 " quit when a syntax file was already loaded | 12 " quit when a syntax file was already loaded |
13 if !exists("main_syntax") | 13 if !exists("main_syntax") |
14 if exists("b:current_syntax") | 14 if exists("b:current_syntax") |
15 finish | 15 finish |
21 | 21 |
22 let s:cpo_save = &cpo | 22 let s:cpo_save = &cpo |
23 set cpo&vim | 23 set cpo&vim |
24 | 24 |
25 syn case ignore | 25 syn case ignore |
26 " Add dash to allowed keyword characters. | |
27 syn iskeyword @,48-57,_,192-255,- | |
26 | 28 |
27 " HTML4 tags | 29 " HTML4 tags |
28 syn keyword cssTagName abbr address area a b base | 30 syn keyword cssTagName abbr address area a b base |
29 syn keyword cssTagName bdo blockquote body br button | 31 syn keyword cssTagName bdo blockquote body br button |
30 syn keyword cssTagName caption cite code col colgroup dd del | 32 syn keyword cssTagName caption cite code col colgroup dd del |
31 syn keyword cssTagName dfn div dl dt em fieldset form | 33 syn keyword cssTagName dfn div dl dt em fieldset form |
32 syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i | 34 syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i |
33 syn keyword cssTagName iframe input ins isindex kbd label legend li | 35 syn keyword cssTagName iframe input ins isindex kbd label legend li |
34 syn keyword cssTagName link map menu meta noscript ol optgroup | 36 syn keyword cssTagName link map menu meta noscript ol optgroup |
35 syn keyword cssTagName option p param pre q s samp script small | 37 syn keyword cssTagName option p param picture pre q s samp script small |
36 syn keyword cssTagName span strong sub sup tbody td | 38 syn keyword cssTagName span strong sub sup tbody td |
37 syn keyword cssTagName textarea tfoot th thead title tr ul u var | 39 syn keyword cssTagName textarea tfoot th thead title tr ul u var |
38 syn keyword cssTagName object svg | 40 syn keyword cssTagName object svg |
39 syn match cssTagName /\<select\>\|\<style\>\|\<table\>/ | 41 syn match cssTagName /\<select\>\|\<style\>\|\<table\>/ |
40 | 42 |
125 | 127 |
126 syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline | 128 syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline |
127 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline | 129 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline |
128 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma | 130 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma |
129 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction | 131 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction |
130 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma | 132 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\|conic-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma |
131 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 | 133 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 |
132 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(blur\|brightness\|contrast\|drop-shadow\|grayscale\|hue-rotate\|invert\|opacity\|saturate\|sepia\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma | 134 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(blur\|brightness\|contrast\|drop-shadow\|grayscale\|hue-rotate\|invert\|opacity\|saturate\|sepia\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma |
133 syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at | 135 syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at |
134 syn match cssFunctionComma contained "," | 136 syn match cssFunctionComma contained "," |
135 | 137 |
218 syn keyword cssFlexibleBoxProp contained order | 220 syn keyword cssFlexibleBoxProp contained order |
219 | 221 |
220 syn match cssFlexibleBoxAttr contained "\<\(row\|column\|wrap\)\(-reverse\)\=\>" | 222 syn match cssFlexibleBoxAttr contained "\<\(row\|column\|wrap\)\(-reverse\)\=\>" |
221 syn keyword cssFlexibleBoxAttr contained nowrap stretch baseline center | 223 syn keyword cssFlexibleBoxAttr contained nowrap stretch baseline center |
222 syn match cssFlexibleBoxAttr contained "\<flex\(-\(start\|end\)\)\=\>" | 224 syn match cssFlexibleBoxAttr contained "\<flex\(-\(start\|end\)\)\=\>" |
223 syn match cssFlexibleBoxAttr contained "\<space\(-\(between\|around\)\)\=\>" | 225 syn match cssFlexibleBoxAttr contained "\<space\(-\(between\|around\|evenly\)\)\=\>" |
224 | 226 |
225 " CSS Fonts Module Level 3 | 227 " CSS Fonts Module Level 3 |
226 " http://www.w3.org/TR/css-fonts-3/ | 228 " http://www.w3.org/TR/css-fonts-3/ |
227 syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>" | 229 syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>" |
228 | 230 |
232 syn match cssFontAttr contained "\<status-bar\>" | 234 syn match cssFontAttr contained "\<status-bar\>" |
233 syn keyword cssFontAttr contained larger smaller | 235 syn keyword cssFontAttr contained larger smaller |
234 syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>" | 236 syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>" |
235 syn match cssFontAttr contained "\<small-\(caps\|caption\)\>" | 237 syn match cssFontAttr contained "\<small-\(caps\|caption\)\>" |
236 " font-family attributes | 238 " font-family attributes |
237 syn match cssFontAttr contained "\<\(sans-\)\=serif\>" | 239 syn keyword cssFontAttr contained sans-serif serif cursive fantasy monospace |
238 syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Verdana Webdings Wingdings York Zapf | |
239 syn keyword cssFontAttr contained cursive fantasy monospace | |
240 " font-feature-settings attributes | 240 " font-feature-settings attributes |
241 syn keyword cssFontAttr contained on off | 241 syn keyword cssFontAttr contained on off |
242 " font-stretch attributes | 242 " font-stretch attributes |
243 syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>" | 243 syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>" |
244 " font-style attributes | 244 " font-style attributes |
281 " https://www.w3.org/TR/css-grid-1/ | 281 " https://www.w3.org/TR/css-grid-1/ |
282 syn match cssGridProp contained "\<grid\>" | 282 syn match cssGridProp contained "\<grid\>" |
283 syn match cssGridProp contained "\<grid-template\(-\(columns\|rows\|areas\)\)\=\>" | 283 syn match cssGridProp contained "\<grid-template\(-\(columns\|rows\|areas\)\)\=\>" |
284 syn match cssGridProp contained "\<grid-\(column\|row\)\(-\(start\|end\|gap\)\)\=\>" | 284 syn match cssGridProp contained "\<grid-\(column\|row\)\(-\(start\|end\|gap\)\)\=\>" |
285 syn match cssGridProp contained "\<grid-\(area\|gap\)\>" | 285 syn match cssGridProp contained "\<grid-\(area\|gap\)\>" |
286 syn match cssGridProp contained "\<gap\>" | |
286 syn match cssGridProp contained "\<grid-auto-\(flow\|rows\|columns\)\>" | 287 syn match cssGridProp contained "\<grid-auto-\(flow\|rows\|columns\)\>" |
287 | 288 |
288 syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>" | 289 syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>" |
289 | 290 |
290 syn match cssListProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>" | 291 syn match cssListProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>" |
291 syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" | 292 syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" |
292 syn match cssListAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>" | 293 syn match cssListAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>" |
293 syn match cssListAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>" | 294 syn match cssListAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>" |
294 syn keyword cssListAttr contained disc circle square hebrew armenian georgian | 295 syn keyword cssListAttr contained disc circle square hebrew armenian georgian |
295 syn keyword cssListAttr contained inside outside | 296 syn keyword cssListAttr contained inside outside |
297 | |
298 " object-fit https://www.w3.org/TR/css-images-3/#the-object-fit | |
299 syn match cssObjectProp contained "\<object-\(fit\|position\)\>" | |
300 syn keyword cssObjectAttr contained fill contain cover scale-down | |
296 | 301 |
297 syn keyword cssPositioningProp contained bottom clear clip display float left | 302 syn keyword cssPositioningProp contained bottom clear clip display float left |
298 syn keyword cssPositioningProp contained position right top visibility | 303 syn keyword cssPositioningProp contained position right top visibility |
299 syn match cssPositioningProp contained "\<z-index\>" | 304 syn match cssPositioningProp contained "\<z-index\>" |
300 syn keyword cssPositioningAttr contained block compact grid | 305 syn keyword cssPositioningAttr contained block compact grid |
301 syn match cssPositioningAttr contained "\<table\(-\(row-group\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>" | 306 syn match cssPositioningAttr contained "\<table\(-\(row-group\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>" |
302 syn keyword cssPositioningAttr contained left right both | 307 syn keyword cssPositioningAttr contained left right both |
303 syn match cssPositioningAttr contained "\<list-item\>" | 308 syn match cssPositioningAttr contained "\<list-item\>" |
304 syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\|grid\|flex\)\)\=\>" | 309 syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\|grid\|flex\)\)\=\>" |
305 syn match cssPositioningAttr contained "\<flow\(-root\)\=\>" | 310 syn match cssPositioningAttr contained "\<flow\(-root\)\=\>" |
306 syn keyword cssPositioningAttr contained static relative absolute fixed subgrid | 311 syn keyword cssPositioningAttr contained static relative absolute fixed subgrid sticky |
307 | 312 |
308 syn keyword cssPrintAttr contained landscape portrait crop cross always | 313 syn keyword cssPrintAttr contained landscape portrait crop cross always |
309 | 314 |
310 syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>" | 315 syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>" |
311 syn keyword cssTableAttr contained fixed collapse separate show hide once always | 316 syn keyword cssTableAttr contained fixed collapse separate show hide once always |
546 hi def link cssListProp cssProp | 551 hi def link cssListProp cssProp |
547 hi def link cssMarqueeProp cssProp | 552 hi def link cssMarqueeProp cssProp |
548 hi def link cssMultiColumnProp cssProp | 553 hi def link cssMultiColumnProp cssProp |
549 hi def link cssPagedMediaProp cssProp | 554 hi def link cssPagedMediaProp cssProp |
550 hi def link cssPositioningProp cssProp | 555 hi def link cssPositioningProp cssProp |
556 hi def link cssObjectProp cssProp | |
551 hi def link cssPrintProp cssProp | 557 hi def link cssPrintProp cssProp |
552 hi def link cssRubyProp cssProp | 558 hi def link cssRubyProp cssProp |
553 hi def link cssSpeechProp cssProp | 559 hi def link cssSpeechProp cssProp |
554 hi def link cssTableProp cssProp | 560 hi def link cssTableProp cssProp |
555 hi def link cssTextProp cssProp | 561 hi def link cssTextProp cssProp |
579 hi def link cssMarqueeAttr cssAttr | 585 hi def link cssMarqueeAttr cssAttr |
580 hi def link cssMultiColumnAttr cssAttr | 586 hi def link cssMultiColumnAttr cssAttr |
581 hi def link cssPaddingAttr cssAttr | 587 hi def link cssPaddingAttr cssAttr |
582 hi def link cssPagedMediaAttr cssAttr | 588 hi def link cssPagedMediaAttr cssAttr |
583 hi def link cssPositioningAttr cssAttr | 589 hi def link cssPositioningAttr cssAttr |
590 hi def link cssObjectAttr cssAttr | |
584 hi def link cssGradientAttr cssAttr | 591 hi def link cssGradientAttr cssAttr |
585 hi def link cssPrintAttr cssAttr | 592 hi def link cssPrintAttr cssAttr |
586 hi def link cssRubyAttr cssAttr | 593 hi def link cssRubyAttr cssAttr |
587 hi def link cssSpeechAttr cssAttr | 594 hi def link cssSpeechAttr cssAttr |
588 hi def link cssTableAttr cssAttr | 595 hi def link cssTableAttr cssAttr |