Fix hidden line numbers The issue is that the `<code>` element needs the `overflow: scroll` (since the code block has a `max-height`). So the line numbers container, which is positioned absolutely using a negative left position is hidden. This is fixed by changing the way the `<code>` element is positioned: not with a margin and a small size, but with the padding & a larger container.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/themes/prism-coy.css b/themes/prism-coy.css
index 5992337..47f90eb 100644
--- a/themes/prism-coy.css
+++ b/themes/prism-coy.css
@@ -41,14 +41,13 @@ pre[class*="language-"] {
background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
background-size: 3em 3em;
background-origin:content-box;
- overflow:visible;
+ overflow: scroll;
max-height:30em;
}
code[class*="language"] {
max-height:29em;
display:block;
- overflow:scroll;
}
/* Margin bottom to accomodate shadow */
@@ -189,3 +188,17 @@ pre[class*="language-"]:after {
.token.lf:before {
color: #e0d7d1;
}
+
+
+/* Plugin styles: Line Numbers */
+pre[class*="language-"].line-numbers {
+ padding-left: 0;
+}
+
+pre[class*="language-"].line-numbers code {
+ padding-left: 3.8em;
+}
+
+pre[class*="language-"].line-numbers .line-numbers-rows {
+ left: 0;
+}