diff --git a/CSS/CSS.sublime-syntax b/CSS/CSS.sublime-syntax index 95ee509888..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() @@ -1966,6 +1968,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..1be15c1e0d 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 */ @@ -654,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 {