diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-05-17 01:50:38 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-05-17 01:50:38 +0900 |
| commit | 36ef8dcf0c87d646970af855db53e5a7f6c51af2 (patch) | |
| tree | acf44f3dc8e60d00e2c5e8c751edb59180bc8480 /vhosts/blog/public/style.css | |
| parent | 546e0bb2f992b31d3cb480948a00100660ee5d9d (diff) | |
| download | nsfisis.dev-36ef8dcf0c87d646970af855db53e5a7f6c51af2.tar.gz nsfisis.dev-36ef8dcf0c87d646970af855db53e5a7f6c51af2.tar.zst nsfisis.dev-36ef8dcf0c87d646970af855db53e5a7f6c51af2.zip | |
feat(blog/nuldoc): allow codeblock to have line number
Diffstat (limited to 'vhosts/blog/public/style.css')
| -rw-r--r-- | vhosts/blog/public/style.css | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vhosts/blog/public/style.css b/vhosts/blog/public/style.css index 830a593b..078c0774 100644 --- a/vhosts/blog/public/style.css +++ b/vhosts/blog/public/style.css @@ -156,6 +156,22 @@ code { padding: 0; } +/* https://github.com/shikijs/shiki/issues/3 */ +.shiki code { + counter-reset: codeblock-line-number; + counter-increment: codeblock-line-number 0; +} + +.numbered .shiki code .line::before { + content: counter(codeblock-line-number); + counter-increment: codeblock-line-number; + width: 2rem; + margin-right: 1.5rem; + display: inline-block; + text-align: right; + color: #777; +} + li.revision { list-style: inside; } |
