comparison vendor/vim-syntax/css.vim @ 646:673c14e2a45e

Update syntaxes
author nanaya <me@nanaya.pro>
date Wed, 16 Sep 2020 15:35:09 +0900
parents ced2ee9efd9f
children a6bbbee07a3a
comparison
equal deleted inserted replaced
645:7e4b3136f55e 646:673c14e2a45e
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 " Claudio Fleiner <claudio@fleiner.com> (Maintainer) 5 " Claudio Fleiner <claudio@fleiner.com> (Maintainer)
5 " Yeti (Add full CSS2, HTML4 support) 6 " Yeti (Add full CSS2, HTML4 support)
6 " Nikolai Weibull (Add CSS2 support) 7 " Nikolai Weibull (Add CSS2 support)
7 " URL: https://github.com/JulesWang/css.vim 8 " URL: https://github.com/jsit/css.vim
8 " Maintainer: Jules Wang <w.jq0722@gmail.com> 9 " Maintainer: Jay Sitter <jay@jaysitter.com>
9 " Last Change: 2019 Jul. 29 10 " Last Change: 2019 Jul. 29
10 11
11 " quit when a syntax file was already loaded 12 " quit when a syntax file was already loaded
12 if !exists("main_syntax") 13 if !exists("main_syntax")
13 if exists("b:current_syntax") 14 if exists("b:current_syntax")
66 endtry 67 endtry
67 68
68 " digits 69 " digits
69 syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators 70 syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators
70 syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators 71 syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" 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 72 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\|fr\|vw\|vh\|vmin\|vmax\|ch\)\>" contains=cssUnitDecorators
72 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators 73 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators
73 syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators 74 syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators
74 syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators 75 syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators
75 syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators 76 syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators
76 77
126 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline 127 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline
127 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma 128 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma
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 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
129 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma 130 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,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 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
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
131 syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at 133 syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at
132 syn match cssFunctionComma contained "," 134 syn match cssFunctionComma contained ","
133 135
134 " Common Prop and Attr 136 " Common Prop and Attr
135 syn keyword cssCommonAttr contained auto none inherit all default normal 137 syn keyword cssCommonAttr contained auto none inherit all default normal
136 syn keyword cssCommonAttr contained top bottom center stretch hidden visible 138 syn keyword cssCommonAttr contained top bottom center stretch hidden visible
139 syn match cssCommonAttr contained "\<\(max-\|min-\|fit-\)content\>"
137 "------------------------------------------------ 140 "------------------------------------------------
138 " CSS Animations 141 " CSS Animations
139 " http://www.w3.org/TR/css3-animations/ 142 " http://www.w3.org/TR/css3-animations/
140 syn match cssAnimationProp contained "\<animation\(-\(delay\|direction\|duration\|fill-mode\|name\|play-state\|timing-function\|iteration-count\)\)\=\>" 143 syn match cssAnimationProp contained "\<animation\(-\(delay\|direction\|duration\|fill-mode\|name\|play-state\|timing-function\|iteration-count\)\)\=\>"
141 144