Skip to content

Commit 12b8f09

Browse files
committed
Finetune fretboard css
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
1 parent 94aa54b commit 12b8f09

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

public/js/extra.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ export function finishView (view) {
502502
try {
503503
const $ele = $(value).parent().parent()
504504
$ele.html(renderFretBoard($value.text(), params))
505+
$ele.addClass('fretboard')
505506
} catch (err) {
506507
$value.unwrap()
507508
$value.parent().append(`<div class="alert alert-warning">${escapeHTML(err)}</div>`)

public/js/lib/renderer/fretboard/css/i.css

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* -- GENERAL TYPOGRAPHY -- */
22
.fretTitle {
33
color: #555;
4+
text-align: center;
45
font-family: "Helvetica Neue", sans-serif;
5-
background: #eee;
66
line-height: 1.4;
77
font-size: 1.6em;
88
margin: 10px 0 10px 0;
@@ -20,14 +20,19 @@ section {
2020
}
2121

2222
/* Fretboard Container/Wrapper */
23+
24+
.fretContainer, .fretContainer_h {
25+
outline: solid 1px #eeee;
26+
margin: 0 auto;
27+
padding: 15px 0;
28+
}
29+
2330
.fretContainer {
2431
width: 320px;
25-
margin: 0 auto;
2632
}
2733

2834
.fretContainer_h {
2935
max-width: 400px;
30-
margin: 0 auto;
3136
}
3237

3338
@media all and (max-width: 400px) {
@@ -59,7 +64,6 @@ section {
5964
position: absolute;
6065
top: 0;
6166
left: 0;
62-
z-index: 10;
6367
}
6468

6569
.svg_wrapper.v4 {
@@ -181,3 +185,7 @@ section {
181185
}
182186

183187
/*# sourceMappingURL=i.css.map */
188+
189+
.markdown-body pre.fretboard {
190+
background-color: transparent;
191+
}

0 commit comments

Comments
 (0)