Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
whitespace and additive decls test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbender committed Aug 31, 2016
1 parent 4afcf88 commit b61da9a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
7 changes: 3 additions & 4 deletions critical.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,9 @@
// take all the declarations that were found from the original CSS and use
// them here, make sure that we de-dup any declarations from the original CSS
criticalRule.declarations =
_.uniqBy(
criticalRule.declarations.concat(originalDecls),
function(decl){ return decl.property + ":" + decl.value; }
);
_.uniqBy(criticalRule.declarations.concat(originalDecls), function(decl){
return decl.property + ":" + decl.value;
});

return criticalRule;
};
Expand Down
1 change: 0 additions & 1 deletion test/files/.#nested.css

This file was deleted.

6 changes: 3 additions & 3 deletions test/files/nested-critical.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@media (min-width:50em){
.bio{background-color: nope;}
.bio{}
}

@supports (box-shadow:50em){
.bio{background-color: nope;}
.bio{}
}

@document url(http://example.com) {
.bio{background-color: nope;}
.bio{background-color: blue;}
}
2 changes: 1 addition & 1 deletion test/files/nested-expected.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
}

@document url(http://example.com) {
.bio{border-size: 1px;}
.bio{background-color: blue;border-size: 1px;}
}

0 comments on commit b61da9a

Please sign in to comment.