perf(typography): optimize the line height of post content

This commit is contained in:
Cotes Chung 2022-10-08 20:00:22 +08:00
parent 304d75c500
commit eac3f9b434
No known key found for this signature in database
GPG key ID: 0D9E54843167A808
2 changed files with 14 additions and 15 deletions

View file

@ -29,11 +29,11 @@ html {
} }
body { body {
line-height: 1.75rem;
background: var(--body-bg); background: var(--body-bg);
color: var(--text-color); color: var(--text-color);
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
font-family: 'Source Sans Pro', 'Microsoft Yahei', sans-serif; font-family: 'Source Sans Pro', 'Microsoft Yahei', sans-serif;
line-height: 1.75;
} }
/* --- Typography --- */ /* --- Typography --- */
@ -440,7 +440,6 @@ img[data-src] {
.post-content { .post-content {
font-size: 1.08rem; font-size: 1.08rem;
line-height: 1.8;
margin-top: 2rem; margin-top: 2rem;
overflow-wrap: break-word; overflow-wrap: break-word;
@ -461,20 +460,17 @@ img[data-src] {
> ol, > ol,
> ul { > ul {
$start-padding: 1.25rem; padding-inline-start: 1.75rem;
padding-inline-start: $start-padding;
margin: 1.25rem 0;
li { li {
margin: 0.5rem 0; margin: 0.25rem 0;
padding-left: 0.4rem; padding-left: 0.4rem;
} }
ol, ol,
ul { ul {
padding-inline-start: $start-padding; padding-inline-start: 1.25rem;
margin: 0.75rem 0; margin: 0.5rem 0;
} }
} }
@ -484,7 +480,7 @@ img[data-src] {
list-style-type: none; list-style-type: none;
> i { /* checkbox icon */ > i { /* checkbox icon */
margin: 0 0.4rem 0.2rem -1.4rem; margin: 0 0.5rem 0.2rem -1.4rem;
vertical-align: middle; vertical-align: middle;
color: var(--checkbox-color); color: var(--checkbox-color);

View file

@ -146,13 +146,16 @@ img.preview-img {
animation: fade-up 0.8s; animation: fade-up 0.8s;
} }
#toc li a { #toc {
font-size: 0.8rem; ul.nav.navbar-nav {
margin: 0.5rem 0;
padding: 0;
&.nav-link:not(.active) { li {
color: inherit; padding-top: 2px;
padding-bottom: 2px;
}
} }
} }
nav[data-toggle=toc] { nav[data-toggle=toc] {