remove superfluous whitespace from media query involving and

This commit is contained in:
Connor Skees 2020-07-06 18:59:21 -04:00
parent 22cc36b578
commit 4edc324fcd
2 changed files with 10 additions and 1 deletions

View File

@ -161,7 +161,7 @@ impl<'a> Parser<'a> {
self.whitespace(); self.whitespace();
if ident.to_ascii_lowercase() == "and" { if ident.to_ascii_lowercase() == "and" {
buf.push_str(" and "); buf.push_str("and ");
} else { } else {
buf.push_str(&ident); buf.push_str(&ident);

View File

@ -40,3 +40,12 @@ test!(
}", }",
"@media not screen {\n a {\n color: red;\n }\n}\n" "@media not screen {\n a {\n color: red;\n }\n}\n"
); );
test!(
multiple_identifiers_in_query_second_is_and,
"@media print and (foo: 1 2 3) {
a {
color: red;
}
}",
"@media print and (foo: 1 2 3) {\n a {\n color: red;\n }\n}\n"
);