From 570601c2a7a89893ad7bb8eb1f740dff260b2b3d Mon Sep 17 00:00:00 2001 From: Reorx Date: Sun, 15 May 2022 23:40:53 +0800 Subject: [PATCH] code block style enhance and toc a padding --- assets/css/common/post-single.css | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 37a5412..1448e9a 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -195,7 +195,7 @@ h6:hover .anchor { } .post-content .highlight:not(table) { - margin: 10px auto; + margin: var(--content-gap) auto; border-radius: var(--radius); } @@ -240,24 +240,23 @@ h6:hover .anchor { .post-content code { /* inline code */ background-color: var(--code-bg); - - margin: auto 4px; - padding: 4px 6px; - font-size: 0.78em; - line-height: 1.5; - border-radius: 2px; -} -.post-content .chroma code { - background-color: inherit; + margin: 0 3px; + padding: 4px 5px; + border-radius: 3px; + font-size: 16px; } .post-content pre code { /* reset inline code */ display: block; margin: auto 0; - padding: 10px; + padding: 15px; overflow-x: auto; + border-radius: var(--radius); word-break: break-all; } +.post-content .chroma code { + background-color: inherit; +} .post-content blockquote { margin: 20px 0; @@ -365,7 +364,7 @@ h6:hover .anchor { } .toc li a { line-height: 1.5em; - padding: .1em .4em; + padding: 3px 5px; border-radius: 5px; display: block; }