aboutsummaryrefslogtreecommitdiff
path: root/site/css
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-01-24 14:05:54 -0300
committerEuAndreh <eu@euandre.org>2020-01-24 14:05:54 -0300
commit10708efbf8a2bc39424eda8c8d77e9371c3fceeb (patch)
tree99393c46d23fe4949174ad6e03645fd82c81467f /site/css
parentRemove "/archive.html" page (diff)
downloadeuandre.org-10708efbf8a2bc39424eda8c8d77e9371c3fceeb.tar.gz
euandre.org-10708efbf8a2bc39424eda8c8d77e9371c3fceeb.tar.xz
CSS: Add line numbers to <pre> blocks
Taken from: https://gist.github.com/potch/1243028 Reference: https://github.com/jaspervdj/hakyll/issues/148
Diffstat (limited to 'site/css')
-rw-r--r--site/css/styles.css13
1 files changed, 13 insertions, 0 deletions
diff --git a/site/css/styles.css b/site/css/styles.css
index 240c61b..6bafcbc 100644
--- a/site/css/styles.css
+++ b/site/css/styles.css
@@ -134,6 +134,19 @@ h2 {
pre {
font-family: "Inconsolata",monospace;
white-space: pre-wrap;
+ border-left: 3ex solid #eee;
+ position: relative;
+ counter-reset: linenumbers;
+}
+
+pre a:before {
+ color: #aaa;
+ content: counter(linenumbers);
+ counter-increment: linenumbers;
+ left: -3ex;
+ position: absolute;
+ text-align: right;
+ width: 2.5ex;
}
code {