allow = and == in media queries
This commit is contained in:
parent
b03561bc37
commit
605f4f3d6b
@ -36,10 +36,10 @@ impl<'a> Parser<'a> {
|
||||
Some(Token { kind: '=', .. }) => {
|
||||
if matches!(toks.peek_next(), Some(Token { kind: '=', .. })) {
|
||||
toks.reset_cursor();
|
||||
true
|
||||
false
|
||||
} else {
|
||||
toks.reset_cursor();
|
||||
false
|
||||
true
|
||||
}
|
||||
}
|
||||
_ => false,
|
||||
|
@ -88,6 +88,26 @@ test!(
|
||||
}",
|
||||
"@media (true) {\n a {\n interpolation: in-parens;\n }\n}\n"
|
||||
);
|
||||
test!(
|
||||
single_eq_in_query,
|
||||
"@media (height=600px) {
|
||||
a {
|
||||
b: c
|
||||
}
|
||||
}
|
||||
",
|
||||
"@media (height = 600px) {\n a {\n b: c;\n }\n}\n"
|
||||
);
|
||||
test!(
|
||||
double_eq_in_query,
|
||||
"@media (height==600px) {
|
||||
a {
|
||||
b: c
|
||||
}
|
||||
}
|
||||
",
|
||||
"@media (false) {\n a {\n b: c;\n }\n}\n"
|
||||
);
|
||||
error!(
|
||||
media_feature_missing_closing_paren,
|
||||
"@media foo and (bar:a", "Error: expected \")\"."
|
||||
|
Loading…
x
Reference in New Issue
Block a user