mirror of
https://github.com/sindresorhus/github-markdown-css.git
synced 2024-03-22 13:10:53 +08:00
fix .octoicons font name - fixes #9
This commit is contained in:
parent
9bee1ac647
commit
8efcd68fd0
|
@ -748,7 +748,7 @@
|
|||
}
|
||||
|
||||
.markdown-body .octicon {
|
||||
font: normal normal 16px octicons;
|
||||
font: normal normal 16px octicons-anchor;
|
||||
line-height: 1;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
|
|
12
index.js
12
index.js
|
@ -62,6 +62,17 @@ function cleanupCss(str) {
|
|||
el.selectors.shift();
|
||||
}
|
||||
|
||||
// rename the .octoicons font
|
||||
if (el.selectors[0] === '.octicon') {
|
||||
el.declarations = el.declarations.map(function (el) {
|
||||
if (el.property === 'font') {
|
||||
el.value += '-anchor';
|
||||
}
|
||||
|
||||
return el;
|
||||
});
|
||||
}
|
||||
|
||||
if (el.selectors.length === 1 && /^(?:html|body)$/.test(el.selectors[0])) {
|
||||
el.declarations = el.declarations.filter(function (declaration) {
|
||||
// remove everything from body/html other than these
|
||||
|
@ -78,7 +89,6 @@ function cleanupCss(str) {
|
|||
selector = '.markdown-body';
|
||||
}
|
||||
|
||||
|
||||
if (!/\.markdown-body/.test(selector)) {
|
||||
selector = '.markdown-body ' + selector;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user