Skip to content

Commit c0f8c2d

Browse files
committed
Add pattern match for nth-child of selector
1 parent ce99e12 commit c0f8c2d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/vscode-css/grammars/css.cson

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,24 @@
16871687
'match': '(?i)even|odd'
16881688
'name': 'support.constant.parity.css'
16891689
}
1690+
{
1691+
'begin': '''(?xi)
1692+
(?<=
1693+
\\:nth-(?:last-)?child\\(
1694+
(?:even|odd|[+-]?(\\d+n?|n)(\\s*[+-]\\s*\\d+)?)\\s*
1695+
)
1696+
(?:of)
1697+
'''
1698+
'beginCaptures':
1699+
'0':
1700+
'name': 'keyword.operator.nth.of.css'
1701+
'end': '(?=\\))'
1702+
'patterns': [
1703+
{
1704+
'include': '#selector-innards'
1705+
}
1706+
]
1707+
}
16901708
]
16911709
}
16921710
]

0 commit comments

Comments
 (0)