Don't print out styles if they are null
This commit is contained in:
parent
8f379c425d
commit
48e618c43d
@ -36,6 +36,9 @@ impl Toplevel {
|
||||
}
|
||||
|
||||
fn push_style(&mut self, s: Style) {
|
||||
if s.value.is_null() {
|
||||
return;
|
||||
}
|
||||
if let Toplevel::RuleSet(_, entries) = self {
|
||||
entries.push(BlockEntry::Style(Box::new(s)));
|
||||
}
|
||||
|
@ -130,3 +130,8 @@ test!(
|
||||
"a {\n color:red\n}\n",
|
||||
"a {\n color: red;\n}\n"
|
||||
);
|
||||
test!(
|
||||
removes_null_value,
|
||||
"a {\n color: null;\n}\n",
|
||||
""
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user