8000 remove the rule if there are no declarations · dimitry12/github-markdown-css@e2c1d9c · GitHub
[go: up one dir, main page]

Skip to content

Commit e2c1d9c

Browse files
committed
remove the rule if there are no declarations
1 parent c919127 commit e2c1d9c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

github-markdown.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
-webkit-text-size-adjust: 100%;
55
}
66

7-
8-
97
.markdown-body a:focus {
108
outline: thin dotted;
119
}

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ function cleanupCss(str) {
6060
});
6161
}
6262

63+
if (el.declarations.length === 0) {
64+
return false;
65+
}
66+
6367
el.selectors = el.selectors.map(function (selector) {
6468
if (/^(?:body|html)$/.test(selector)) {
6569
selector = '.markdown-body';

0 commit comments

Comments
 (0)
0