From 6965a86c4d6a607be556c9d490c7c6dfd9127dd2 Mon Sep 17 00:00:00 2001 From: Junyi Date: Tue, 23 Apr 2024 12:53:21 +0800 Subject: [PATCH] add: added support for "lineno" in codefences, added support for "" tag --- assets/css/main.css | 68 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 7 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 16e78ec..0c76ba4 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -179,7 +179,6 @@ kbd { line-height: 154%; border-radius: 6px; border: 1px solid var(--pre-border-color); - overflow: auto; } /* tag */ @@ -212,8 +211,67 @@ pre kbd kbd { margin-right: 0.2em; } -/* ```python``` like */ -pre code { +p code, +p kbd { + padding: 0.1em 0.3em; + /* top, bottom */ + margin-right: 4px; +} + +td pre { + border: none; + /* padding: 0px; */ + border-radius: 0px; +} + +td:first-child pre { + padding-right: 0; +} + +td:last-child pre { + padding-left: 0; +} + +td pre code { + /* when there is a line number grid */ + padding: 0px; + display: flex; + flex-direction: column; + border-radius: 0px; + /* padding-top: 4px; */ + /* padding-bottom: 4px; */ +} + +div.highlight { + border-radius: 6px; + border: 1px solid var(--pre-border-color); + margin-bottom: 14px; +} + +div.highlight pre { + border: none; + display: grid; + margin: 0px; + /* padding-left: 10px; */ + /* padding-right: 10px; */ + /* padding-top: 10px; */ + /* padding-bottom: 10px; */ +} + +div.highlight code { + padding-left: 0px; + padding-right: 0px; +} + +div.highlight code a:hover, +div.highlight code a:focus { + color: white; + border-bottom: 1px solid white; + /*for markup.highlight.anchorLineNos = true*/ +} + +pre code, +pre kbd { color: inherit; background-color: inherit; border: none; @@ -799,10 +857,6 @@ ul.footer-menu>li { overflow: auto; } -.highlight pre { - padding-right: 75px; -} - .highlight:hover .highlight-copy-btn { display: inline-block; border: 1px solid rgba(255, 255, 255, 0.1);