diff --git a/syntax/css.vim b/syntax/css.vim index 2bd152d..5cee353 100644 --- a/syntax/css.vim +++ b/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: 2024 Nov 12 +" Last Change: 2025 Nov 07 " quit when a syntax file was already loaded if !exists("main_syntax") @@ -193,7 +193,14 @@ syn keyword cssBorderAttr contained thin thick medium " box-decoration-break attributes syn keyword cssBorderAttr contained clone slice + "------------------------------------------------ +" CSS Masking Module Level 1 +" https://www.w3.org/TR/css-masking-1/ +syn match cssMaskProp contained "\" +syn keyword cssMaskAttr contained none luminance alpha match-source +syn keyword cssMaskAttr contained add subtract intersect exclude +syn keyword cssMaskAttr contained fill-box stroke-box view-box no-clip syn match cssBoxProp contained "\" syn match cssBoxProp contained "\" @@ -657,6 +664,8 @@ hi def link cssProp StorageClass hi def link cssAttr Constant hi def link cssUnitDecorators Number hi def link cssNoise Noise +hi def link cssMaskProp cssProp +hi def link cssMaskAttr cssAttr let b:current_syntax = "css" diff --git a/test.css b/test.css index 3eeb5d4..f3e4f83 100644 --- a/test.css +++ b/test.css @@ -343,3 +343,30 @@ and (max-device-width:1024px) background-position-x: 20px; background-position-y: 20px; } + +/* mask properties tests */ +#mask-test { + mask: url('{!URLFOR($Resource.images)}/mask.png') no-repeat 50% 50% / contain, linear-gradient(black,transparent); + mask: none; + mask-image: url('{!URLFOR($Resource.images)}/mask.png'), linear-gradient(black, transparent); + mask-image: linear-gradient(black, transparent); + mask-mode: none; + mask-mode: alpha; + mask-mode: match-source; + mask-position: top; + mask-position: bottom; + mask-position: center; + mask-size: cover; + mask-repeat: repeat-x; + mask-origin: content-box; + mask-composite: add; + mask-composite: subtract; + mask-composite: intersect; + mask-composite: exclude; + mask-type: luminance; + mask-clip: padding-box; + mask-clip: fill-box; + mask-clip: stroke-box; + mask-clip: view-box; + mask-clip: no-clip; +}