allow media queries to contain a single identifier wrapped in parens

This commit is contained in:
Connor Skees 2020-07-07 11:23:09 -04:00
parent b56a4a3fcc
commit df60ef094c
2 changed files with 6 additions and 1 deletions

View File

@ -58,7 +58,7 @@ impl<'a> Parser<'a> {
self.toks.next();
self.toks.next();
}
'>' | '<' | ':' => {
'>' | '<' | ':' | ')' => {
break;
}
_ => {

View File

@ -49,3 +49,8 @@ test!(
}",
"@media print and (foo: 1 2 3) {\n a {\n color: red;\n }\n}\n"
);
test!(
single_identifier_inside_parens,
"@media (color) {a {color: red;}}",
"@media (color) {\n a {\n color: red;\n }\n}\n"
);