Skip to content

Commit 15f1624

Browse files
committed
Fix positioning of paragraph link for code snippets
So that it is actually possible to click them
1 parent 6d4ada4 commit 15f1624

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

html/css/ejs.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ pre {
5353
padding: 5px 0 5px 15px;
5454
line-height: 1.35;
5555
margin: 1rem 0;
56-
position: relative;
5756
}
5857

5958
pre[data-language=javascript] {
@@ -322,8 +321,7 @@ blockquote footer:before {
322321

323322
.sandboxhint {
324323
position: absolute;
325-
top: 5px;
326-
right: 0px;
324+
right: -15px;
327325
font-family: tahoma, arial, sans-serif;
328326
font-size: 70%;
329327
padding: 4px 8px;

html/js/ejs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ window.addEventListener("load", function() {
1919
chapNum == 1 && !/console\.log/.test(pre.textContent)) continue;
2020
sandboxHint = elt("div", {"class": "sandboxhint"},
2121
"edit & run code by clicking it");
22-
pre.appendChild(sandboxHint);
22+
pre.insertBefore(sandboxHint, pre.firstChild);
2323
break;
2424
}
2525
}

0 commit comments

Comments
 (0)