Fix style

This commit is contained in:
qingwei.li 2016-11-26 21:07:47 +08:00
commit 824e64ae48
4 changed files with 7 additions and 6 deletions

View file

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="/themes/vue.css"> <link rel="stylesheet" href="/themes/buble.css">
</head> </head>
<body> <body>
<nav> <nav>

View file

@ -30,7 +30,7 @@ renderer.heading = function (text, level) {
renderer.code = function (code, lang) { renderer.code = function (code, lang) {
const hl = Prism.highlight(code, Prism.languages[lang] || Prism.languages.markup) const hl = Prism.highlight(code, Prism.languages[lang] || Prism.languages.markup)
return `<pre><code class="lang-${lang}" data-lang="${lang}">${hl}</code></pre>` return `<pre data-lang="${lang}"><code class="lang-${lang}">${hl}</code></pre>`
} }
marked.setOptions({ renderer }) marked.setOptions({ renderer })

View file

@ -362,9 +362,10 @@ main {
} }
.markdown-section pre>code { .markdown-section pre>code {
padding: 0; display: block;
font-family: Inconsolata; font-family: Inconsolata;
line-height: 1.2em; line-height: 1.2em;
padding: 0;
} }
.markdown-section code::after, .markdown-section code::before { .markdown-section code::after, .markdown-section code::before {

View file

@ -283,13 +283,14 @@ main {
} }
.markdown-section pre { .markdown-section pre {
font-family: 'Roboto Mono', Monaco, courier, monospace;
-moz-osx-font-smoothing: initial; -moz-osx-font-smoothing: initial;
-webkit-font-smoothing: initial; -webkit-font-smoothing: initial;
background-color: #f8f8f8; background-color: #f8f8f8;
font-family: 'Roboto Mono', Monaco, courier, monospace;
line-height: 1.5em; line-height: 1.5em;
margin: 1.2em 0; margin: 1.2em 0;
padding: 1.2em 1.4em; padding: 1.2em 1.4em;
position: relative;
} }
/* code highlight */ /* code highlight */
@ -415,7 +416,6 @@ code .token {
pre code { pre code {
overflow-x: auto; overflow-x: auto;
position: relative;
padding: 0; padding: 0;
background-color: #f8f8f8; background-color: #f8f8f8;
padding: 0.8em 0.8em 0.4em; padding: 0.8em 0.8em 0.4em;
@ -423,7 +423,7 @@ pre code {
border-radius: 2px; border-radius: 2px;
} }
pre code::after { pre::after {
color: #ccc; color: #ccc;
content: attr(data-lang); content: attr(data-lang);
font-size: 0.75em; font-size: 0.75em;