diff --git a/LESS.sublime-syntax b/LESS.sublime-syntax index fbb0b26..8e5e711 100644 --- a/LESS.sublime-syntax +++ b/LESS.sublime-syntax @@ -464,8 +464,12 @@ contexts: pop: true - match: '\(' scope: meta.group.css punctuation.section.group.begin.css - - match: '[0-9]+' + - match: '[+-]' + scope: keyword.operator.css + - match: '[0-9]+(n*)' scope: meta.group.css constant.numeric.css + captures: + 1: keyword.other.unit.css - match: (:|::)(selection|first-line|first-letter|before|backdrop|after)\b scope: meta.selector.css entity.other.pseudo-element.css captures: diff --git a/syntax_test_less.less b/syntax_test_less.less index 0114570..04474ea 100755 --- a/syntax_test_less.less +++ b/syntax_test_less.less @@ -228,6 +228,9 @@ html::before { .avatar:not(.class) {} /* ^ meta.group.css entity.other.attribute-name.class.css */ /* ^ meta.group.css punctuation.section.group.end.css */ +.class#id:nth-child(2n-1) {} +/* ^ constant.numeric.css keyword.other.unit.css */ +/* ^ keyword.operator.css */ .avatar:nth-child(3) { /* ^ entity.other.pseudo-class.css punctuation.definition.entity.css */ /*. ^ entity.other.pseudo-class.css */