From c5dff305e2b8618d268714f0678a5a11f60afe37 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Tue, 19 Sep 2017 12:51:24 +0300 Subject: [PATCH 1/2] [CSS] support 0 lengths --- CSS/CSS.sublime-syntax | 2 ++ CSS/syntax_test_css.css | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CSS/CSS.sublime-syntax b/CSS/CSS.sublime-syntax index 95ee509888..6de72bc597 100644 --- a/CSS/CSS.sublime-syntax +++ b/CSS/CSS.sublime-syntax @@ -1966,6 +1966,8 @@ contexts: scope: constant.numeric.css captures: 1: keyword.other.unit.css + - match: '0\b(?!%)' + scope: constant.numeric.css time-type: - match: '{{number}}({{duration_units}})\b' diff --git a/CSS/syntax_test_css.css b/CSS/syntax_test_css.css index 3302f0fa1a..1decf11b57 100644 --- a/CSS/syntax_test_css.css +++ b/CSS/syntax_test_css.css @@ -631,8 +631,13 @@ /* ^^^ constant.numeric.css */ top: translateX(1%); +/* ^^^^^^^^^^ support.function.transform */ /* ^^ constant.numeric.css */ + top: translateZ(0); +/* ^^^^^^^^^^ support.function.transform */ +/* ^ constant.numeric.css */ + top: skewY(1deg); /* ^^^^^ support.function.transform.css */ /* ^^^^ constant.numeric.css */ From de08a6d895b2721e579a741796bc5d91fbbe122b Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Tue, 19 Sep 2017 13:08:06 +0300 Subject: [PATCH 2/2] [CSS] support use of var function in scale and translate functions --- CSS/CSS.sublime-syntax | 2 ++ CSS/syntax_test_css.css | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/CSS/CSS.sublime-syntax b/CSS/CSS.sublime-syntax index 6de72bc597..742d7e84d7 100644 --- a/CSS/CSS.sublime-syntax +++ b/CSS/CSS.sublime-syntax @@ -1032,6 +1032,7 @@ contexts: pop: true - include: comma-delimiter - include: number-type + - include: var-function # transform functions with comma separated or types # translate(), translate3d() @@ -1050,6 +1051,7 @@ contexts: - include: percentage-type - include: length-type - include: number-type + - include: var-function # transform functions with a single or type # translateX(), translateY() diff --git a/CSS/syntax_test_css.css b/CSS/syntax_test_css.css index 1decf11b57..1be15c1e0d 100644 --- a/CSS/syntax_test_css.css +++ b/CSS/syntax_test_css.css @@ -659,6 +659,13 @@ top: skewY(1rad) rotate(1turn); /* ^^^^^^ support.function.transform.css */ /* ^^^^^ constant.numeric.css */ + + transform: translate(var(--center), 0) scale(var(--ripple-scale), 1); +/* ^^^^^^^^^ support.function.transform */ +/* ^^^ support.function.var */ +/* ^^^^^^^^ support.type.custom-property */ +/* ^ constant.numeric */ +/* ^^^ support.function.var */ } .test-timing-functions {