mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-01 07:45:01 -04:00
fixed github line numbering issue, fixed a few bugs in code block styling
This commit is contained in:
parent
3a967a6b1e
commit
63d642d017
@ -1,4 +1,5 @@
|
|||||||
.highlight, html .gist .gist-file .gist-syntax .gist-highlight {
|
.highlight, html .gist .gist-file .gist-syntax .gist-highlight {
|
||||||
|
table td.code { width: 100%; }
|
||||||
.line-numbers {
|
.line-numbers {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@ -85,8 +86,8 @@ h3.filename {
|
|||||||
+ pre { @include border-top-radius(0px); }
|
+ pre { @include border-top-radius(0px); }
|
||||||
}
|
}
|
||||||
|
|
||||||
p code,
|
p, li {
|
||||||
li code {
|
code {
|
||||||
@extend .mono;
|
@extend .mono;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
white-space: no-wrap;
|
white-space: no-wrap;
|
||||||
@ -98,6 +99,8 @@ li code {
|
|||||||
@include border-radius(.4em);
|
@include border-radius(.4em);
|
||||||
padding: 0 .3em;
|
padding: 0 .3em;
|
||||||
margin: -1px 0;
|
margin: -1px 0;
|
||||||
|
}
|
||||||
|
pre code { font-size: 1em !important; background: none; border: none; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.pre-code {
|
.pre-code {
|
||||||
@ -216,6 +219,7 @@ figure.code {
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.code-title {
|
.code-title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@ -243,3 +247,4 @@ figure.code {
|
|||||||
text-shadow: #cbcccc 0 1px 0;
|
text-shadow: #cbcccc 0 1px 0;
|
||||||
padding-left: 3em;
|
padding-left: 3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ function addCodeLineNumbers() {
|
|||||||
lineNumbers = '<pre class="line-numbers">',
|
lineNumbers = '<pre class="line-numbers">',
|
||||||
tableMiddle = '</pre></td><td class="code">',
|
tableMiddle = '</pre></td><td class="code">',
|
||||||
tableEnd = '</td></tr></tbody></table>',
|
tableEnd = '</td></tr></tbody></table>',
|
||||||
count = $('span.line', code).length;
|
count = $('.line', code).length;
|
||||||
for (var i=1;i<=count; i++) {
|
for (var i=1;i<=count; i++) {
|
||||||
lineNumbers += '<span class="line-number">'+i+'</span>\n';
|
lineNumbers += '<span class="line-number">'+i+'</span>\n';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user