remove the rule if there are no declarations

This commit is contained in:
Sindre Sorhus 2014-06-22 18:40:40 +02:00
parent c919127550
commit e2c1d9c49b
2 changed files with 4 additions and 2 deletions

View File

@ -4,8 +4,6 @@
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
} }
.markdown-body a:focus { .markdown-body a:focus {
outline: thin dotted; outline: thin dotted;
} }

View File

@ -60,6 +60,10 @@ function cleanupCss(str) {
}); });
} }
if (el.declarations.length === 0) {
return false;
}
el.selectors = el.selectors.map(function (selector) { el.selectors = el.selectors.map(function (selector) {
if (/^(?:body|html)$/.test(selector)) { if (/^(?:body|html)$/.test(selector)) {
selector = '.markdown-body'; selector = '.markdown-body';