codekingpro/portable-devtools
115k
1" Vim syntax file2" Language: Cascading Style Sheets3" Previous Contributor List:4" Jules Wang <w.jq0722@gmail.com>5" Claudio Fleiner <claudio@fleiner.com>6" Yeti (Add full CSS2, HTML4 support)7" Nikolai Weibull (Add CSS2 support)8" URL: https://github.com/vim-language-dept/css-syntax.vim9" Maintainer: Jay Sitter <jay@jaysitter.com>10" Last Change: 2024 Mar 211" Changelog:12" 2025 Nov 11: improve support for cssBoxProperties #1871713" 2026 Feb 13: add missing numeric units (baseline 2015, 2020, 2022, 2023, 2026) #1932514 15" quit when a syntax file was already loaded16if !exists("main_syntax")17 if exists("b:current_syntax")18 finish19 endif20 let main_syntax = 'css'21elseif exists("b:current_syntax") && b:current_syntax == "css"22 finish23endif24 25let s:cpo_save = &cpo26set cpo&vim27 28syn case ignore29" Add dash to allowed keyword characters.30syn iskeyword @,48-57,_,192-255,-31 32" HTML4 tags33syn keyword cssTagName abbr address area a b base34syn keyword cssTagName bdo blockquote body br button35syn keyword cssTagName caption cite code col colgroup dd del36syn keyword cssTagName dfn div dl dt em fieldset form37syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i38syn keyword cssTagName iframe input ins isindex kbd label legend li39syn keyword cssTagName link map menu meta noscript ol optgroup40syn keyword cssTagName option p param picture pre q s samp script small41syn keyword cssTagName span strong sub sup tbody td42syn keyword cssTagName textarea tfoot th thead title tr ul u var43syn keyword cssTagName object svg44syn match cssTagName /\<select\>\|\<style\>\|\<table\>/45 46" 34 HTML5 tags47syn keyword cssTagName article aside audio bdi canvas command data48syn keyword cssTagName datalist details dialog embed figcaption figure footer49syn keyword cssTagName header hgroup keygen main mark menuitem meter nav50syn keyword cssTagName output progress rt rp ruby section51syn keyword cssTagName source summary time track video wbr52 53" Tags not supported in HTML554" acronym applet basefont big center dir55" font frame frameset noframes strike tt56 57syn match cssTagName "\*"58 59" selectors60syn match cssSelectorOp "[,>+~]"61syn match cssSelectorOp2 "[~|^$*]\?=" contained62syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ63 64" .class and #id65syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot66syn match cssClassNameDot contained '\.'67 68try69syn match cssIdentifier "#[A-Za-zÀ-ÿ_@][A-Za-zÀ-ÿ0-9_@-]*"70catch /^.*/71syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"72endtry73 74" digits75syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators76syn match cssValueNumber contained "[-+]\=\d\+\%(\.\d*\)\=" contains=cssUnitDecorators77syn match cssValueLength contained "[-+]\=\d\+\%(\.\d*\)\=\%(mm\|cm\|in\|pt\|pc\|px\|dpi\|dppx\|dpcm\|fr\|Q\|x\)\>" contains=cssUnitDecorators78syn match cssValueLength contained "[-+]\=\d\+\%(\.\d*\)\=r\=\%(em\|ex\|cap\|lh\|ch\|ic\)\>" contains=cssUnitDecorators79syn match cssValueLength contained "[-+]\=\d\+\%(\.\d*\)\=[dls]\=\%(vb\|vh\|vi\|vmax\|vmin\|vw\)\>" contains=cssUnitDecorators80syn match cssValueLength contained "[-+]\=\d\+\%(\.\d*\)\=%" contains=cssUnitDecorators81syn match cssValueAngle contained "[-+]\=\d\+\%(\.\d*\)\=\%(deg\|grad\|rad\|turn\)\>" contains=cssUnitDecorators82syn match cssValueTime contained "+\=\d\+\%(\.\d*\)\=\%(ms\|s\)\>" contains=cssUnitDecorators83syn match cssValueFrequency contained "+\=\d\+\%(\.\d*\)\=\%(Hz\|kHz\)\>" contains=cssUnitDecorators84 85" The 16 basic color names86syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow87 88" 130 more color names89syn keyword cssColor contained aliceblue antiquewhite aquamarine azure90syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood91syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan92syn match cssColor contained /\<dark\%(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)\>/93syn match cssColor contained /\<dark\%(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)\>/94syn match cssColor contained /\<darkslate\%(blue\|gray\|grey\)\>/95syn match cssColor contained /\<dark\%(turquoise\|violet\)\>/96syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick97syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold98syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink99syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen100syn keyword cssColor contained lemonchiffon limegreen linen magenta101syn match cssColor contained /\<light\%(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)\>/102syn match cssColor contained /\<light\%(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)\>/103syn match cssColor contained /\<light\%(slategray\|slategrey\|steelblue\)\>/104syn match cssColor contained /\<medium\%(aquamarine\|blue\|orchid\|purple\|seagreen\)\>/105syn match cssColor contained /\<medium\%(slateblue\|springgreen\|turquoise\|violetred\)\>/106syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite107syn keyword cssColor contained oldlace olivedrab orange orangered orchid108syn match cssColor contained /\<pale\%(goldenrod\|green\|turquoise\|violetred\)\>/109syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue110syn keyword cssColor contained rosybrown royalblue rebeccapurple saddlebrown salmon111syn keyword cssColor contained sandybrown seagreen seashell sienna skyblue slateblue112syn keyword cssColor contained slategray slategrey snow springgreen steelblue tan113syn keyword cssColor contained thistle tomato turquoise violet wheat114syn keyword cssColor contained whitesmoke yellowgreen115 116" FIXME: These are actually case-insensitive too, but (a) specs recommend using117" mixed-case (b) it's hard to highlight the word `Background' correctly in118" all situations119syn case match120syn 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 Background121syn case ignore122 123syn match cssImportant contained "!\s*important\>"124syn match cssCustomProp contained "\<--[a-zA-Z0-9-_]*\>"125 126syn match cssColor contained "\<transparent\>"127syn match cssColor contained "\<currentColor\>"128syn match cssColor contained "\<white\>"129syn match cssColor contained "#\x\{3,4\}\>" contains=cssUnitDecorators130syn match cssColor contained "#\x\{6\}\>" contains=cssUnitDecorators131syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators132 133syn region cssURL contained matchgroup=cssFunctionName start="\<\%(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline134syn region cssMathGroup contained matchgroup=cssMathParens start="(" end=")" containedin=cssFunction,cssMathGroup contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline135syn region cssFunction contained matchgroup=cssFunctionName start="\<\%(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssURL,cssColor,cssStringQ,cssStringQQ oneline136syn region cssFunction contained matchgroup=cssFunctionName start="\<\%(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma137syn region cssFunction contained matchgroup=cssFunctionName start="\<\%(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction138syn region cssFunction contained matchgroup=cssFunctionName start="\<\%(linear-\|radial-\|conic-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma139syn 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,cssFunctionComma140syn 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,cssFunctionComma141syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at142syn match cssFunctionComma contained ","143 144" Common Prop and Attr145syn keyword cssCommonAttr contained auto none inherit all default normal146syn keyword cssCommonAttr contained top bottom center stretch hidden visible147syn match cssCommonAttr contained "\<\%(max-\|min-\|fit-\)content\>"148"------------------------------------------------149" CSS Animations150" http://www.w3.org/TR/css3-animations/151syn match cssAnimationProp contained "\<animation\%(-\%(delay\|direction\|duration\|fill-mode\|name\|play-state\|timing-function\|iteration-count\)\)\=\>"152 153" animation-direction attributes154syn keyword cssAnimationAttr contained alternate reverse155syn match cssAnimationAttr contained "\<alternate-reverse\>"156 157" animation-fill-mode attributes158syn keyword cssAnimationAttr contained forwards backwards both159 160" animation-play-state attributes161syn keyword cssAnimationAttr contained running paused162 163" animation-iteration-count attributes164syn keyword cssAnimationAttr contained infinite165"------------------------------------------------166" CSS Backgrounds and Borders Module Level 3167" http://www.w3.org/TR/css3-background/168syn match cssBackgroundProp contained "\<background\%(-\%(attachment\|clip\|color\|image\|origin\|position\|repeat\|size\)\)\=\>"169" background-attachment attributes170syn keyword cssBackgroundAttr contained scroll fixed local171 172" background-position attributes173syn keyword cssBackgroundAttr contained left center right top bottom174 175" background-repeat attributes176syn match cssBackgroundAttr contained "\<no-repeat\>"177syn match cssBackgroundAttr contained "\<repeat\%(-[xy]\)\=\>"178 179" background-size attributes180syn keyword cssBackgroundAttr contained cover contain181 182syn match cssBorderProp contained "\<border\%(-\%(top\|right\|bottom\|left\)\)\=\%(-\%(width\|color\|style\)\)\=\>"183syn match cssBorderProp contained "\<border\%(-\%(top\|bottom\)-\%(left\|right\)\)\=-radius\>"184syn match cssBorderProp contained "\<border-\%(inline\|block\)\%(-\%(start\|end\)\)\=\%(-\%(style\|width\|color\)\)\=\>"185syn match cssBorderProp contained "\<border-\%(start\|end\)-\%(start\|end\)-radius\>"186syn match cssBorderProp contained "\<border-image\%(-\%(outset\|repeat\|slice\|source\|width\)\)\=\>"187syn match cssBorderProp contained "\<box-decoration-break\>"188syn match cssBorderProp contained "\<box-shadow\>"189 190" border-image attributes191syn keyword cssBorderAttr contained stretch round fill192 193" border-style attributes194syn keyword cssBorderAttr contained dotted dashed solid double groove ridge inset outset195 196" border-width attributes197syn keyword cssBorderAttr contained thin thick medium198 199" box-decoration-break attributes200syn keyword cssBorderAttr contained clone slice201"------------------------------------------------202 203syn match cssBoxProp contained "\<padding\%(-\%(top\|right\|bottom\|left\)\)\=\>"204syn match cssBoxProp contained "\<margin\%(-\%(top\|right\|bottom\|left\)\)\=\>"205syn match cssBoxProp contained "\<\%(margin\|padding\)\%(-\%(inline\|block\)\%(-\%(start\|end\)\)\=\)\=\>"206syn match cssBoxProp contained "\<overflow\%(-\%(x\|y\|style\)\)\=\>"207syn match cssBoxProp contained "\<rotation\%(-point\)\=\>"208syn keyword cssBoxAttr contained visible hidden scroll auto209syn match cssBoxAttr contained "\<no-\%(display\|content\)\>"210 211syn keyword cssCascadeProp contained all212syn keyword cssCascadeAttr contained initial unset revert213 214syn keyword cssColorProp contained opacity215syn match cssColorProp contained "\<color-profile\>"216syn match cssColorProp contained "\<rendering-intent\>"217 218 219syn match cssDimensionProp contained "\<\%(min\|max\)-\%(width\|height\)\>"220syn keyword cssDimensionProp contained height221syn keyword cssDimensionProp contained width222 223" CSS Flexible Box Layout Module Level 1224" http://www.w3.org/TR/css3-flexbox/225" CSS Box Alignment Module Level 3226" http://www.w3.org/TR/css-align-3/227syn match cssFlexibleBoxProp contained "\<flex\%(-\%(direction\|wrap\|flow\|grow\|shrink\|basis\)\)\=\>"228syn match cssFlexibleBoxProp contained "\<\%(align\|justify\)\%(-\%(items\|self\|content\)\)\=\>"229syn keyword cssFlexibleBoxProp contained order230 231syn match cssFlexibleBoxAttr contained "\<\%(row\|column\|wrap\)\%(-reverse\)\=\>"232syn keyword cssFlexibleBoxAttr contained nowrap stretch baseline center233syn match cssFlexibleBoxAttr contained "\<flex\%(-\%(start\|end\)\)\=\>"234syn match cssFlexibleBoxAttr contained "\<space\%(-\%(between\|around\|evenly\)\)\=\>"235 236" CSS Fonts Module Level 3237" http://www.w3.org/TR/css-fonts-3/238syn match cssFontProp contained "\<font\%(-\%(display\|family\|feature-settings\|kerning\|language-override\|size\%(-adjust\)\=\|stretch\|style\|synthesis\|variant\%(-\%(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>"239 240" font attributes241syn keyword cssFontAttr contained icon menu caption242syn match cssFontAttr contained "\<message-box\>"243syn match cssFontAttr contained "\<status-bar\>"244syn keyword cssFontAttr contained larger smaller245syn match cssFontAttr contained "\<\%(x\{1,2\}-\)\=\%(large\|small\)\>"246syn match cssFontAttr contained "\<small-\%(caps\|caption\)\>"247" font-family attributes248syn keyword cssFontAttr contained sans-serif serif cursive fantasy monospace249" font-feature-settings attributes250syn keyword cssFontAttr contained on off251" font-stretch attributes252syn match cssFontAttr contained "\<\%(\%(ultra\|extra\|semi\)-\)\=\%(condensed\|expanded\)\>"253" font-style attributes254syn keyword cssFontAttr contained italic oblique255" font-synthesis attributes256syn keyword cssFontAttr contained weight style257" font-weight attributes258syn keyword cssFontAttr contained bold bolder lighter259" font-display attributes260syn keyword cssFontAttr contained auto block swap fallback optional261" TODO: font-variant-* attributes262"------------------------------------------------263 264" Webkit specific property/attributes265syn match cssFontProp contained "\<font-smooth\>"266syn match cssFontAttr contained "\<\%(subpixel-\)\=\antialiased\>"267 268 269" CSS Multi-column Layout Module270" http://www.w3.org/TR/css3-multicol/271syn match cssMultiColumnProp contained "\<break-\%(after\|before\|inside\)\>"272syn match cssMultiColumnProp contained "\<column-\%(count\|fill\|gap\|rule\%(-\%(color\|style\|width\)\)\=\|span\|width\)\>"273syn keyword cssMultiColumnProp contained columns274syn keyword cssMultiColumnAttr contained balance medium275syn keyword cssMultiColumnAttr contained always left right page column276syn match cssMultiColumnAttr contained "\<avoid\%(-\%(page\|column\)\)\=\>"277 278" http://www.w3.org/TR/css3-break/#page-break279syn match cssMultiColumnProp contained "\<page\%(-break-\%(before\|after\|inside\)\)\=\>"280 281" http://www.w3.org/TR/SVG11/interact.html282syn match cssInteractProp contained "\<pointer-events\>"283syn match cssInteractAttr contained "\<\%(visible\)\=\%(Painted\|Fill\|Stroke\)\=\>"284 285" TODO find following items in w3c docs.286syn keyword cssGeneratedContentProp contained quotes crop287syn match cssGeneratedContentProp contained "\<counter-\%(reset\|increment\)\>"288syn match cssGeneratedContentProp contained "\<move-to\>"289syn match cssGeneratedContentProp contained "\<page-policy\>"290syn match cssGeneratedContentAttr contained "\<\%(no-\)\=\%(open\|close\)-quote\>"291 292" https://www.w3.org/TR/css-grid-1/293syn match cssGridProp contained "\<grid\>"294syn match cssGridProp contained "\<grid-template\%(-\%(columns\|rows\|areas\)\)\=\>"295syn match cssGridProp contained "\<\%(grid-\)\=\%(column\|row\)\%(-\%(start\|end\|gap\)\)\=\>"296syn match cssGridProp contained "\<grid-\%(area\|gap\)\>"297syn match cssGridProp contained "\<gap\>"298syn match cssGridProp contained "\<grid-auto-\%(flow\|rows\|columns\)\>"299 300syn match cssHyerlinkProp contained "\<target\%(-\%(name\|new\|position\)\)\=\>"301 302syn match cssListProp contained "\<list-style\%(-\%(type\|position\|image\)\)\=\>"303syn match cssListAttr contained "\<\%(lower\|upper\)-\%(roman\|alpha\|greek\|latin\)\>"304syn match cssListAttr contained "\<\%(hiragana\|katakana\)\%(-iroha\)\=\>"305syn match cssListAttr contained "\<\%(decimal\%(-leading-zero\)\=\|cjk-ideographic\)\>"306syn keyword cssListAttr contained disc circle square hebrew armenian georgian307syn keyword cssListAttr contained inside outside308 309" object-fit https://www.w3.org/TR/css-images-3/#the-object-fit310syn match cssObjectProp contained "\<object-\%(fit\|position\)\>"311syn keyword cssObjectAttr contained fill contain cover scale-down312 313syn keyword cssPositioningProp contained bottom clear clip display float left314syn keyword cssPositioningProp contained position right top visibility315syn match cssPositioningProp contained "\<z-index\>"316syn keyword cssPositioningAttr contained block compact grid317syn match cssPositioningAttr contained "\<table\%(-\%(row-group\|\%(header\|footer\)-group\|row\|column\%(-group\)\=\|cell\|caption\)\)\=\>"318syn keyword cssPositioningAttr contained left right both319syn match cssPositioningAttr contained "\<list-item\>"320syn match cssPositioningAttr contained "\<inline\%(-\%(block\|box\|table\|grid\|flex\)\)\=\>"321syn match cssPositioningAttr contained "\<flow\%(-root\)\=\>"322syn keyword cssPositioningAttr contained static relative absolute fixed subgrid sticky323 324syn keyword cssPrintAttr contained landscape portrait crop cross always325 326syn match cssTableProp contained "\<\%(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>"327syn keyword cssTableAttr contained fixed collapse separate show hide once always328 329 330syn keyword cssTextProp contained color direction hyphens331syn match cssTextProp "\<\%(\%(word\|letter\)-spacing\|text\%(-\%(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"332syn match cssTextProp contained "\<text-\%(justify\|outline\|warp\|align-last\|size-adjust\|rendering\|stroke\|indent\)\>"333syn match cssTextProp contained "\<\%(word\|line\)-break\|\%(overflow\|word\)-wrap\>"334syn match cssTextProp contained "\<white-space\>"335syn match cssTextProp contained "\<hanging-punctuation\>"336syn match cssTextProp contained "\<tab-size\>"337syn match cssTextProp contained "\<punctuation-trim\>"338syn match cssTextAttr contained "\<line-through\>"339syn match cssTextAttr contained "\<\%(text-\)\=\%(top\|bottom\)\>"340syn keyword cssTextAttr contained ltr rtl embed nowrap341syn keyword cssTextAttr contained underline overline blink sub super middle342syn keyword cssTextAttr contained capitalize uppercase lowercase343syn keyword cssTextAttr contained justify baseline sub super344syn keyword cssTextAttr contained optimizeLegibility optimizeSpeed geometricPrecision345syn match cssTextAttr contained "\<pre\%(-\%(line\|wrap\)\)\=\>"346syn match cssTextAttr contained "\<\%(allow\|force\)-end\>"347syn keyword cssTextAttr contained start end adjacent348syn match cssTextAttr contained "\<inter-\%(word\|ideographic\|cluster\)\>"349syn keyword cssTextAttr contained distribute kashida first last350syn keyword cssTextAttr contained clip ellipsis unrestricted suppress351syn match cssTextAttr contained "\<break-all\>"352syn match cssTextAttr contained "\<break-word\>"353syn keyword cssTextAttr contained manual354syn match cssTextAttr contained "\<bidi-override\>"355 356syn match cssTransformProp contained "\<transform\%(-\%(origin\|style\)\)\=\>"357syn match cssTransformProp contained "\<perspective\%(-origin\)\=\>"358syn match cssTransformProp contained "\<backface-visibility\>"359 360" CSS Transitions361" http://www.w3.org/TR/css3-transitions/362syn match cssTransitionProp contained "\<transition\%(-\%(delay\|duration\|property\|timing-function\)\)\=\>"363 364" transition-time-function attributes365syn match cssTransitionAttr contained "\<linear\%(-gradient\)\@!\>"366syn match cssTransitionAttr contained "\<ease\%(-\%(in-out\|out\|in\)\)\=\>"367syn match cssTransitionAttr contained "\<step\%(-start\|-end\)\=\>"368"------------------------------------------------369" CSS Basic User Interface Module Level 3 (CSS3 UI)370" http://www.w3.org/TR/css3-ui/371syn match cssUIProp contained "\<box-sizing\>"372syn match cssUIAttr contained "\<\%(content\|padding\|border\)\%(-box\)\=\>"373 374syn keyword cssUIProp contained cursor375syn match cssUIAttr contained "\<\%(\%([ns]\=[ew]\=\)\|col\|row\|nesw\|nwse\)-resize\>"376syn keyword cssUIAttr contained crosshair help move pointer alias copy377syn keyword cssUIAttr contained progress wait text cell move378syn match cssUIAttr contained "\<context-menu\>"379syn match cssUIAttr contained "\<no-drop\>"380syn match cssUIAttr contained "\<not-allowed\>"381syn match cssUIAttr contained "\<all-scroll\>"382syn match cssUIAttr contained "\<\%(vertical-\)\=text\>"383syn match cssUIAttr contained "\<zoom\%(-in\|-out\)\=\>"384 385syn match cssUIProp contained "\<ime-mode\>"386syn keyword cssUIAttr contained active inactive disabled387 388syn match cssUIProp contained "\<nav-\%(down\|index\|left\|right\|up\)\=\>"389syn match cssUIProp contained "\<outline\%(-\%(width\|style\|color\|offset\)\)\=\>"390syn keyword cssUIAttr contained invert391 392syn keyword cssUIProp contained icon resize393syn keyword cssUIAttr contained both horizontal vertical394 395syn match cssUIProp contained "\<text-overflow\>"396syn keyword cssUIAttr contained clip ellipsis397 398syn match cssUIProp contained "\<image-rendering\>"399syn keyword cssUIAttr contained pixellated400syn match cssUIAttr contained "\<crisp-edges\>"401 402"------------------------------------------------403" Webkit/iOS specific attributes404syn match cssUIAttr contained '\<preserve-3d\>'405" IE specific attributes406syn match cssIEUIAttr contained '\<bicubic\>'407 408" Webkit/iOS specific properties409syn match cssUIProp contained '\<\%(tap-highlight-color\|user-select\|touch-callout\)\>'410" IE specific properties411syn match cssIEUIProp contained '\<\%(interpolation-mode\|zoom\|filter\)\>'412 413" Webkit/Firebox specific properties/attributes414syn keyword cssUIProp contained appearance415syn keyword cssUIAttr contained window button field icon document menu416 417 418syn match cssAuralProp contained "\<\%(pause\|cue\)\%(-\%(before\|after\)\)\=\>"419syn match cssAuralProp contained "\<\%(play-during\|speech-rate\|voice-family\|pitch\%(-range\)\=\|speak\%(-\%(punctuation\|numeral\|header\)\)\=\)\>"420syn keyword cssAuralProp contained volume during azimuth elevation stress richness421syn match cssAuralAttr contained "\<\%(x-\)\=\%(soft\|loud\)\>"422syn keyword cssAuralAttr contained silent423syn match cssAuralAttr contained "\<spell-out\>"424syn keyword cssAuralAttr contained non mix425syn match cssAuralAttr contained "\<\%(left\|right\)-side\>"426syn match cssAuralAttr contained "\<\%(far\|center\)-\%(left\|center\|right\)\>"427syn keyword cssAuralAttr contained leftwards rightwards behind428syn keyword cssAuralAttr contained below level above lower higher429syn match cssAuralAttr contained "\<\%(x-\)\=\%(slow\|fast\|low\|high\)\>"430syn keyword cssAuralAttr contained faster slower431syn keyword cssAuralAttr contained male female child code digits continuous432 433" mobile text434syn match cssMobileTextProp contained "\<text-size-adjust\>"435 436syn keyword cssMediaProp contained width height orientation scan437syn keyword cssMediaProp contained any-hover any-pointer color-gamut grid hover438syn keyword cssMediaProp contained overflow-block overflow-inline pointer update439syn match cssMediaProp contained /\<\%(\%(max\|min\)-\)\=\%(\%(device\)-\)\=aspect-ratio\>/440syn match cssMediaProp contained /\<\%(\%(max\|min\)-\)\=device-pixel-ratio\>/441syn match cssMediaProp contained /\<\%(\%(max\|min\)-\)\=device-\%(height\|width\)\>/442syn match cssMediaProp contained /\<\%(\%(max\|min\)-\)\=\%(height\|width\|resolution\|monochrome\|color\%(-index\)\=\)\>/443syn keyword cssMediaAttr contained portrait landscape progressive interlace444syn keyword cssMediaAttr contained coarse fast fine hover infinite p3 paged445syn keyword cssMediaAttr contained rec2020 scroll slow srgb446syn match cssKeyFrameProp contained /\%(\d\+\%(\.\d\+\)\?%\|\%(\<from\|to\>\)\)/ nextgroup=cssDefinition447syn match cssPageMarginProp /@\%(\%(top\|left\|right\|bottom\)-\%(left\|center\|right\|middle\|bottom\)\)\%(-corner\)\=/ contained nextgroup=cssDefinition448syn keyword cssPageProp contained content size449syn keyword cssPageProp contained orphans widows450syn keyword cssFontDescriptorProp contained src451syn match cssFontDescriptorProp contained "\<unicode-range\>"452" unicode-range attributes453syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+"454syn match cssFontDescriptorAttr contained "U+\x\+-\x\+"455 456syn match cssBraces contained "[{}]"457syn match cssError contained "{@<>"458syn 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 fold459syn match cssBraceError "}"460syn match cssAttrComma ","461 462" Pseudo class463" https://www.w3.org/TR/selectors-4/464syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssNoise,cssPseudoClassId,cssUnicodeEscape,cssVendor,cssPseudoClassFn465syn keyword cssPseudoClassId contained link visited active hover before after left right466syn keyword cssPseudoClassId contained root empty target enabled disabled checked invalid467syn match cssPseudoClassId contained "\<first-\%(line\|letter\)\>"468syn match cssPseudoClassId contained "\<\%(first\|last\|only\)-\%(of-type\|child\)\>"469syn match cssPseudoClassId contained "\<focus\%(-within\|-visible\)\=\>"470syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\%(not\|is\|lang\|\%(nth\|nth-last\)-\%(of-type\|child\)\)(" end=")" contains=cssStringQ,cssStringQQ,cssTagName,cssAttributeSelector,cssClassName,cssIdentifier471" ------------------------------------472" Vendor specific properties473syn match cssPseudoClassId contained "\<selection\>"474syn match cssPseudoClassId contained "\<\%(input-\)\=placeholder\>"475 476" Misc highlight groups477syntax match cssUnitDecorators /\%(#\|-\|+\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained478syntax match cssNoise contained /\%(:\|;\|\/\)/479 480" Comment481syn region cssComment start="/\*" end="\*/" contains=@Spell fold482 483syn match cssUnicodeEscape "\\\x\{1,6}\s\?"484syn match cssSpecialCharQQ +\\\\\|\\"+ contained485syn match cssSpecialCharQ +\\\\\|\\'+ contained486syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ487syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ488 489" Vendor Prefix490syn match cssVendor contained "-\%(webkit\|moz\|o\|ms\)-"491 492" Various CSS Hack characters493" In earlier versions of IE (6 and 7), one can prefix property names494" with a _ or * to isolate those definitions to particular versions of IE495" This is purely decorative and therefore we assign to the same highlight496" group to cssVendor, for more information:497" http://www.paulirish.com/2009/browser-specific-css-hacks/498syn match cssHacks contained /\%(_\|*\)/499 500" Attr Enhance501" Some keywords are both Prop and Attr, so we have to handle them502" cssPseudoClassId is hidden by cssAttrRegion, so we add it here. see #69503syn region cssAttrRegion start=/:/ end=/\ze\%(;\|)\|}\|{\)/ contained contains=cssPseudoClassId,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise504 505" Hack for transition506" 'transition' has Props after ':'.507syn region cssAttrRegion start=/transition\s*:/ end=/\ze\%(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise508 509syn match cssAtKeyword /@\%(font-face\|media\|keyframes\|import\|charset\|namespace\|page\|supports\)/510 511syn keyword cssAtRuleLogical only not and contained512 513" @media514" Reference: http://www.w3.org/TR/css3-mediaqueries/515syn region cssAtRule start=/@media\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssComment,cssCustomProp,cssFunctionName nextgroup=cssDefinition516syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained517 518" @page519" http://www.w3.org/TR/css3-page/520syn region cssAtRule start=/@page\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssPagePseudo,cssComment nextgroup=cssDefinition521syn match cssPagePseudo /:\%(left\|right\|first\|blank\)/ contained skipwhite skipnl522" @keyframe523" http://www.w3.org/TR/css3-animations/#keyframes524syn region cssAtRule start=/@\%(-[a-z]\+-\)\=keyframes\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssVendor,cssComment nextgroup=cssDefinition525 526syn region cssAtRule start=/@import\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword,cssURL,cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssMediaType527syn region cssAtRule start=/@charset\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword528syn region cssAtRule start=/@namespace\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword529 530" @supports531" https://www.w3.org/TR/css3-conditional/#at-supports532syn region cssAtRule start=/@supports\>/ end=/\ze{/ skipwhite skipnl contains=cssAtRuleLogical,cssAttrRegion,css.*Prop,cssValue.*,cssVendor,cssAtKeyword,cssComment nextgroup=cssDefinition533 534 535if main_syntax == "css"536 syn sync minlines=10537endif538 539" Define the default highlighting.540" Only when an item doesn't have highlighting yet541 542hi def link cssComment Comment543hi def link cssVendor Comment544hi def link cssHacks Comment545hi def link cssTagName Statement546hi def link cssDeprecated Error547hi def link cssSelectorOp Special548hi def link cssSelectorOp2 Special549hi def link cssAttrComma Special550 551hi def link cssAnimationProp cssProp552hi def link cssBackgroundProp cssProp553hi def link cssBorderProp cssProp554hi def link cssBoxProp cssProp555hi def link cssCascadeProp cssProp556hi def link cssColorProp cssProp557hi def link cssContentForPagedMediaProp cssProp558hi def link cssDimensionProp cssProp559hi def link cssFlexibleBoxProp cssProp560hi def link cssFontProp cssProp561hi def link cssGeneratedContentProp cssProp562hi def link cssGridProp cssProp563hi def link cssHyerlinkProp cssProp564hi def link cssInteractProp cssProp565hi def link cssLineboxProp cssProp566hi def link cssListProp cssProp567hi def link cssMarqueeProp cssProp568hi def link cssMultiColumnProp cssProp569hi def link cssPagedMediaProp cssProp570hi def link cssPositioningProp cssProp571hi def link cssObjectProp cssProp572hi def link cssPrintProp cssProp573hi def link cssRubyProp cssProp574hi def link cssSpeechProp cssProp575hi def link cssTableProp cssProp576hi def link cssTextProp cssProp577hi def link cssTransformProp cssProp578hi def link cssTransitionProp cssProp579hi def link cssUIProp cssProp580hi def link cssIEUIProp cssProp581hi def link cssAuralProp cssProp582hi def link cssRenderProp cssProp583hi def link cssMobileTextProp cssProp584 585hi def link cssAnimationAttr cssAttr586hi def link cssBackgroundAttr cssAttr587hi def link cssBorderAttr cssAttr588hi def link cssBoxAttr cssAttr589hi def link cssContentForPagedMediaAttr cssAttr590hi def link cssDimensionAttr cssAttr591hi def link cssFlexibleBoxAttr cssAttr592hi def link cssFontAttr cssAttr593hi def link cssGeneratedContentAttr cssAttr594hi def link cssGridAttr cssAttr595hi def link cssHyerlinkAttr cssAttr596hi def link cssInteractAttr cssAttr597hi def link cssLineboxAttr cssAttr598hi def link cssListAttr cssAttr599hi def link cssMarginAttr cssAttr600hi def link cssMarqueeAttr cssAttr601hi def link cssMultiColumnAttr cssAttr602hi def link cssPaddingAttr cssAttr603hi def link cssPagedMediaAttr cssAttr604hi def link cssPositioningAttr cssAttr605hi def link cssObjectAttr cssAttr606hi def link cssGradientAttr cssAttr607hi def link cssPrintAttr cssAttr608hi def link cssRubyAttr cssAttr609hi def link cssSpeechAttr cssAttr610hi def link cssTableAttr cssAttr611hi def link cssTextAttr cssAttr612hi def link cssTransformAttr cssAttr613hi def link cssTransitionAttr cssAttr614hi def link cssUIAttr cssAttr615hi def link cssIEUIAttr cssAttr616hi def link cssAuralAttr cssAttr617hi def link cssRenderAttr cssAttr618hi def link cssCascadeAttr cssAttr619hi def link cssCommonAttr cssAttr620 621hi def link cssPseudoClassId PreProc622hi def link cssPseudoClassLang Constant623hi def link cssValueLength Number624hi def link cssValueInteger Number625hi def link cssValueNumber Number626hi def link cssValueAngle Number627hi def link cssValueTime Number628hi def link cssValueFrequency Number629hi def link cssFunction Constant630hi def link cssURL String631hi def link cssFunctionName Function632hi def link cssFunctionComma Function633hi def link cssColor Constant634hi def link cssIdentifier Function635hi def link cssAtRule Include636hi def link cssAtKeyword PreProc637hi def link cssImportant Special638hi def link cssCustomProp Special639hi def link cssBraces Function640hi def link cssBraceError Error641hi def link cssError Error642hi def link cssUnicodeEscape Special643hi def link cssStringQQ String644hi def link cssStringQ String645hi def link cssAttributeSelector String646hi def link cssMediaType Special647hi def link cssMediaComma Normal648hi def link cssAtRuleLogical Statement649hi def link cssMediaProp cssProp650hi def link cssMediaAttr cssAttr651hi def link cssPagePseudo PreProc652hi def link cssPageMarginProp cssAtKeyword653hi def link cssPageProp cssProp654hi def link cssKeyFrameProp Constant655hi def link cssFontDescriptor Special656hi def link cssFontDescriptorProp cssProp657hi def link cssFontDescriptorAttr cssAttr658hi def link cssUnicodeRange Constant659hi def link cssClassName Function660hi def link cssClassNameDot Function661hi def link cssProp StorageClass662hi def link cssAttr Constant663hi def link cssUnitDecorators Number664hi def link cssNoise Noise665 666let b:current_syntax = "css"667 668if main_syntax == 'css'669 unlet main_syntax670endif671 672let &cpo = s:cpo_save673unlet s:cpo_save674 675" vim: ts=8676 