Merge pull request #9 from pickfire/media

refactor media conditional
This commit is contained in:
Connor Skees 2020-05-26 13:16:40 -04:00 committed by GitHub
commit 65183dde88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,9 +64,7 @@ impl Media {
}
}
if super_selector.is_empty() {
body.append(&mut rules);
} else {
if !super_selector.is_empty() {
body = vec![Spanned {
node: Stmt::RuleSet(RuleSet {
selector: super_selector.clone(),
@ -75,8 +73,8 @@ impl Media {
}),
span: kind_span,
}];
body.append(&mut rules);
}
body.append(&mut rules);
Ok(Media {
super_selector: Selector::new(),