selector can start with >

This commit is contained in:
ConnorSkees 2020-04-01 22:31:10 -04:00
parent d48560781c
commit b71b11dccb
2 changed files with 3 additions and 1 deletions

View File

@ -283,7 +283,7 @@ impl<'a> StyleSheetParser<'a> {
while let Some(Token { kind, .. }) = self.lexer.peek() {
match kind {
'a'..='z' | 'A'..='Z' | '_' | '-'
| '[' | '#' | ':' | '*' | '%' | '.' => rules
| '[' | '#' | ':' | '*' | '%' | '.' | '>' => rules
.extend(self.eat_rules(&Selector::new(), &mut GLOBAL_SCOPE.with(|s| s.borrow().clone()))?),
&'\t' | &'\n' | ' ' => {
self.lexer.next();

View File

@ -316,3 +316,5 @@ test!(
"ul li#foo {\n foo: bar;\n}\n"
);
test!(escaped_space, "a\\ b {\n color: foo;\n}\n");
// blocked on whitespace
// test!(multiple_consecutive_immediate_child,"> > foo {\n color: foo;\n}\n",);