mirror of
https://github.com/sindresorhus/github-markdown-css.git
synced 2024-03-22 13:10:53 +08:00
remove the rule if there are no declarations
This commit is contained in:
parent
c919127550
commit
e2c1d9c49b
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
4
index.js
4
index.js
|
@ -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';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user