mirror of
https://github.com/neovim/neovim.git
synced 2026-07-09 10:59:38 +00:00
vim-patch:06512b1: runtime(css): add more missing CSS properties
This is defined in the 'CSS Overflow Module Level 3' spec[1] and
supported by recent versions of all browsers reported by MDN[2], see the
MDN page also for the available values.
Link: https://drafts.csswg.org/css-overflow/#scrollbar-gutter-property [1]
Link: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/scrollbar-gutter#browser_compatibility [2]
related: vim/vim#20639
closes: vim/vim#20653
06512b153c
Co-authored-by: Jay Sitter <jay@jaysitter.com>
Co-Authored-by: Matthew Hughes <matthewhughes934@gmail.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
" Changelog:
|
||||
" 2025 Nov 11: improve support for cssBoxProperties #18717
|
||||
" 2026 Feb 13: add missing numeric units (baseline 2015, 2020, 2022, 2023, 2026) #19325
|
||||
" 2026 Jun 28: add scrollbar-gutter properties
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if !exists("main_syntax")
|
||||
@@ -203,11 +204,28 @@ syn keyword cssBorderAttr contained clone slice
|
||||
syn match cssBoxProp contained "\<padding\%(-\%(top\|right\|bottom\|left\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<margin\%(-\%(top\|right\|bottom\|left\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<\%(margin\|padding\)\%(-\%(inline\|block\)\%(-\%(start\|end\)\)\=\)\=\>"
|
||||
syn match cssBoxProp contained "\<overflow\%(-\%(x\|y\|style\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<rotation\%(-point\)\=\>"
|
||||
syn keyword cssBoxAttr contained visible hidden scroll auto
|
||||
syn match cssBoxAttr contained "\<no-\%(display\|content\)\>"
|
||||
|
||||
"------------------------------------------------
|
||||
" CSS Overflow Module Level 3
|
||||
" https://www.w3.org/TR/css-overflow-3/
|
||||
syn match cssOverflowProp contained "\<overflow-clip-margin\>"
|
||||
|
||||
syn match cssOverflowProp contained "\<text-overflow\>"
|
||||
syn keyword cssOverflowAttr contained clip ellipsis
|
||||
|
||||
syn match cssOverflowProp contained "\<overflow\%(-\%(x\|y\|inline\|block\)\)\=\>"
|
||||
syn keyword cssOverflowAttr contained visible hidden clip scroll auto
|
||||
|
||||
syn match cssOverflowProp contained "\<scrollbar-gutter\>"
|
||||
syn keyword cssOverflowAttr contained auto stable both-edges
|
||||
|
||||
syn match cssOverflowProp contained "\<scroll-behavior\>"
|
||||
syn keyword cssOverflowAttr contained auto smooth
|
||||
"------------------------------------------------
|
||||
|
||||
syn keyword cssCascadeProp contained all
|
||||
syn keyword cssCascadeAttr contained initial unset revert
|
||||
|
||||
@@ -392,7 +410,6 @@ syn keyword cssUIAttr contained invert
|
||||
syn keyword cssUIProp contained icon resize
|
||||
syn keyword cssUIAttr contained both horizontal vertical
|
||||
|
||||
syn match cssUIProp contained "\<text-overflow\>"
|
||||
syn keyword cssUIAttr contained clip ellipsis
|
||||
|
||||
syn match cssUIProp contained "\<image-rendering\>"
|
||||
@@ -435,7 +452,7 @@ syn match cssMobileTextProp contained "\<text-size-adjust\>"
|
||||
|
||||
syn keyword cssMediaProp contained width height orientation scan
|
||||
syn keyword cssMediaProp contained any-hover any-pointer color-gamut grid hover
|
||||
syn keyword cssMediaProp contained overflow-block overflow-inline pointer update
|
||||
syn keyword cssMediaProp contained pointer update
|
||||
syn match cssMediaProp contained /\<\%(\%(max\|min\)-\)\=\%(\%(device\)-\)\=aspect-ratio\>/
|
||||
syn match cssMediaProp contained /\<\%(\%(max\|min\)-\)\=device-pixel-ratio\>/
|
||||
syn match cssMediaProp contained /\<\%(\%(max\|min\)-\)\=device-\%(height\|width\)\>/
|
||||
@@ -569,6 +586,7 @@ hi def link cssMultiColumnProp cssProp
|
||||
hi def link cssPagedMediaProp cssProp
|
||||
hi def link cssPositioningProp cssProp
|
||||
hi def link cssObjectProp cssProp
|
||||
hi def link cssOverflowProp cssProp
|
||||
hi def link cssPrintProp cssProp
|
||||
hi def link cssRubyProp cssProp
|
||||
hi def link cssSpeechProp cssProp
|
||||
|
||||
Reference in New Issue
Block a user