Skip to content

Commit ef2a91f

Browse files
fix css issue and box resizing
1 parent e5f900d commit ef2a91f

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

static/css/prism.css

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/css/prism_orig.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ pre[data-line] {
9595
/* Same as .prism’s padding-top */
9696

9797
background: #706000;
98+
z-index: -1; /* Show text over it; */
9899

99100
pointer-events: none;
100101

@@ -169,7 +170,7 @@ pre[class*="language-"].line-numbers>code {
169170
}
170171

171172
.token a {
172-
color: inherit;
173+
color: inherit!important;
173174
}
174175

175176
div.code-toolbar {

static/misc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
window.addEventListener("DOMContentLoaded", () => {
2+
3+
14
(function () {
25
// Images click
36
for (var image of document.querySelectorAll("img[src]")) {
@@ -36,3 +39,17 @@
3639
setInterval(updateThemedStuff, 1000); // allow time for giscus frame to load; and afterwards if it takes longer
3740
dmmq.addEventListener('change', updateThemedStuff);
3841
})();
42+
43+
44+
45+
});
46+
47+
if (window.Prism) {
48+
var timeout;
49+
window.addEventListener("resize", () => {
50+
// debounce
51+
if (timeout) clearTimeout(timeout);
52+
timeout = setTimeout(() => Prism.highlightAll(), 200);
53+
});
54+
// make sure that the line highlight boxes resize appropriately.
55+
}

0 commit comments

Comments
 (0)