summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/content/style.css16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/content/style.css b/src/content/style.css
index df82637..1232457 100644
--- a/src/content/style.css
+++ b/src/content/style.css
@@ -248,6 +248,22 @@ pre.lineno {
background-color: var(--color-code-bg);
}
+/* A line wider than the page scrolls inside the box that frames it.
+ Saying so on the pre alone is not enough: the line numbers sit in a
+ table cell beside the code, and a table grows to fit what it holds,
+ so the pre is never narrower than its longest line and never has
+ anything to scroll. The box scrolls instead, and the numbers stay
+ where they are while the code moves under them. */
+.highlight, .listingblock .content {
+ overflow-x: auto;
+}
+
+.listingblock td:first-child {
+ position: sticky;
+ left: 0;
+ background-color: var(--color-code-bg);
+}
+
pre {
overflow: auto;
}