From 56734226afaca893f37b462e2a4787d2d2a13ce2 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 4 Mar 2024 22:36:01 +0100 Subject: [PATCH] vim-patch:e84490311ba3 runtime(css): update syntax script https://github.com/vim/vim/commit/e84490311ba32cb258cc738bc3caa8b448c84c8b Co-authored-by: Jay Sitter --- runtime/syntax/css.vim | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index f8104ea2c5..f4d09cfa4e 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -7,7 +7,7 @@ " Nikolai Weibull (Add CSS2 support) " URL: https://github.com/vim-language-dept/css-syntax.vim " Maintainer: Jay Sitter -" Last Change: 2021 Oct 20 +" Last Change: 2024 Mar 2 " quit when a syntax file was already loaded if !exists("main_syntax") @@ -127,7 +127,7 @@ syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline syn region cssMathGroup contained matchgroup=cssMathParens start="(" end=")" containedin=cssFunction,cssMathGroup contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline -syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssURL,cssColor,cssStringQ,cssStringQQ oneline syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\|conic-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma @@ -176,6 +176,8 @@ syn keyword cssBackgroundAttr contained cover contain syn match cssBorderProp contained "\" syn match cssBorderProp contained "\" +syn match cssBorderProp contained "\" +syn match cssBorderProp contained "\" syn match cssBorderProp contained "\" syn match cssBorderProp contained "\" syn match cssBorderProp contained "\" @@ -195,6 +197,7 @@ syn keyword cssBorderAttr contained clone slice syn match cssBoxProp contained "\" syn match cssBoxProp contained "\" +syn match cssBoxProp contained "\<\(margin\|padding\)\(-\(inline\|block\)\(-\(start\|end\)\)\)\=\>" syn match cssBoxProp contained "\" syn match cssBoxProp contained "\" syn keyword cssBoxAttr contained visible hidden scroll auto @@ -227,7 +230,7 @@ syn match cssFlexibleBoxAttr contained "\" +syn match cssFontProp contained "\" " font attributes syn keyword cssFontAttr contained icon menu caption @@ -248,6 +251,8 @@ syn keyword cssFontAttr contained italic oblique syn keyword cssFontAttr contained weight style " font-weight attributes syn keyword cssFontAttr contained bold bolder lighter +" font-display attributes +syn keyword cssFontAttr contained auto block swap fallback optional " TODO: font-variant-* attributes "------------------------------------------------ @@ -282,7 +287,7 @@ syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" " https://www.w3.org/TR/css-grid-1/ syn match cssGridProp contained "\" syn match cssGridProp contained "\" -syn match cssGridProp contained "\" +syn match cssGridProp contained "\<\(grid-\)\=\(column\|row\)\(-\(start\|end\|gap\)\)\=\>" syn match cssGridProp contained "\" syn match cssGridProp contained "\" syn match cssGridProp contained "\" @@ -452,12 +457,12 @@ syn match cssAttrComma "," " Pseudo class " https://www.w3.org/TR/selectors-4/ syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssNoise,cssPseudoClassId,cssUnicodeEscape,cssVendor,cssPseudoClassFn -syn keyword cssPseudoClassId contained link visited active hover before after left right any-link -syn keyword cssPseudoClassId contained root empty target enabled disabled checked invalid default defined autofill fullscreen host indeterminate in-range modal optional out-of-range picture-in-picture placeholder-shown paused playing read-only read-write required scope +syn keyword cssPseudoClassId contained link visited active hover before after left right +syn keyword cssPseudoClassId contained root empty target enabled disabled checked invalid syn match cssPseudoClassId contained "\" syn match cssPseudoClassId contained "\<\(first\|last\|only\)-\(of-type\|child\)\>" syn match cssPseudoClassId contained "\" -syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(where\|has\|host\|not\|is\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" contains=cssStringQ,cssStringQQ,cssTagName,cssAttributeSelector,cssClassName,cssIdentifier +syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(not\|is\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" contains=cssStringQ,cssStringQQ,cssTagName,cssAttributeSelector,cssClassName,cssIdentifier " ------------------------------------ " Vendor specific properties syn match cssPseudoClassId contained "\"