aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/shiki.css
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/shiki.css')
-rw-r--r--frontend/app/shiki.css18
1 files changed, 17 insertions, 1 deletions
diff --git a/frontend/app/shiki.css b/frontend/app/shiki.css
index 91b6e18..9e456fe 100644
--- a/frontend/app/shiki.css
+++ b/frontend/app/shiki.css
@@ -1,3 +1,19 @@
-pre.shiki {
+.shiki {
white-space: pre-wrap;
}
+
+/* https://github.com/shikijs/shiki/issues/3 */
+.shiki code {
+ counter-reset: line-number;
+ counter-increment: line-number 0;
+}
+
+.shiki code .line::before {
+ content: counter(line-number);
+ counter-increment: line-number;
+ width: 2rem;
+ margin-right: 1.5rem;
+ display: inline-block;
+ text-align: right;
+ color: #aaa;
+}