vim-css3-syntax icon indicating copy to clipboard operation
vim-css3-syntax copied to clipboard

Some CSS functions not highlighted correctly

Open hail2u opened this issue 8 years ago • 1 comments

  • [ ] invert()
  • [ ] running()
  • [ ] element()
  • [ ] fit-content()
  • [ ] inset()
  • [ ] circle()
  • [ ] ellipse()
  • [ ] fade()

There are many conflicts around syntaxes. #36 and #39 are merged to this issue.

hail2u avatar Jun 28 '16 03:06 hail2u

I noticed that rotate() was not highlighted properly and was about to submit an issue when I saw this one. I have a quick bodge that should also work for the other functions:

diff --git a/after/syntax/css/logical-1.vim b/after/syntax/css/logical-1.vim
index d944ff8..392fbfd 100644
--- a/after/syntax/css/logical-1.vim
+++ b/after/syntax/css/logical-1.vim
@@ -2,4 +2,5 @@ syn match cssFontProp contained "\<\(\(min\|max\)-\)\=\(block\|inline\)-size\>"
 syn match cssFontProp contained "\<\(margin\|inset\|padding\)\(-\(block\|inline\)\(-\(start\|end\)\)\=\)\=\>"
 syn match cssFontProp contained "\<border-\(block\|inline\)\(\(-\(start\|end\)\)\=\(-\(width\|style\|color\)\)\=\)\=\>"
 syn match cssFontProp contained "\<border-\(start\|end\)-\(start\|end\)-radius\>"
-syn keyword cssFontAttr contained logical physical rotate
+syn keyword cssFontAttr contained logical physical
+syn match cssFontAttr "\<rotate\%(\s*(\)\@!"

I could go through the other functions and submit a PR, unless you'd prefer to come up with something better.

ObserverOfTime avatar Nov 15 '18 13:11 ObserverOfTime