code block style enhance and toc a padding

This commit is contained in:
Reorx 2022-05-15 23:40:53 +08:00
parent ff878743de
commit 570601c2a7
1 changed files with 11 additions and 12 deletions

View File

@ -195,7 +195,7 @@ h6:hover .anchor {
} }
.post-content .highlight:not(table) { .post-content .highlight:not(table) {
margin: 10px auto; margin: var(--content-gap) auto;
border-radius: var(--radius); border-radius: var(--radius);
} }
@ -240,24 +240,23 @@ h6:hover .anchor {
.post-content code { .post-content code {
/* inline code */ /* inline code */
background-color: var(--code-bg); background-color: var(--code-bg);
margin: 0 3px;
margin: auto 4px; padding: 4px 5px;
padding: 4px 6px; border-radius: 3px;
font-size: 0.78em; font-size: 16px;
line-height: 1.5;
border-radius: 2px;
}
.post-content .chroma code {
background-color: inherit;
} }
.post-content pre code { .post-content pre code {
/* reset inline code */ /* reset inline code */
display: block; display: block;
margin: auto 0; margin: auto 0;
padding: 10px; padding: 15px;
overflow-x: auto; overflow-x: auto;
border-radius: var(--radius);
word-break: break-all; word-break: break-all;
} }
.post-content .chroma code {
background-color: inherit;
}
.post-content blockquote { .post-content blockquote {
margin: 20px 0; margin: 20px 0;
@ -365,7 +364,7 @@ h6:hover .anchor {
} }
.toc li a { .toc li a {
line-height: 1.5em; line-height: 1.5em;
padding: .1em .4em; padding: 3px 5px;
border-radius: 5px; border-radius: 5px;
display: block; display: block;
} }