Add values-4.vim

This is a syntax file for CSS Values and Units Module Level 4.
See also: https://www.w3.org/TR/2018/CR-css-values-3-20180814/
This commit is contained in:
Kyo Nagashima
2018-08-16 09:26:37 +09:00
parent d7d7f60fe8
commit 33d7eb1218
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(vi\|vb\|ic\|cap\|lh\|rlh\)"
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(min\|max\|clamp\|toggle\)\s*(" end=")" oneline keepend

View File

@@ -1032,6 +1032,19 @@ view {
display: calc(100%/3 - 2*1em - 2*1px);
}
.values-4 {
display: 1vi;
display: 1vb;
display: 1ic;
display: 1cap;
display: 1lh;
display: 1rlh;
display: min(0, 1);
display: max(0, 1);
display: clamp(0, 100, 2);
display: toggle(italic, normal);
}
.variables-1 {
--var-foo: auto;
display: var(foo);