From af64c0891084eb34838bf27af1547660b349a0b4 Mon Sep 17 00:00:00 2001 From: XPoet Date: Thu, 21 Jan 2021 17:31:25 +0800 Subject: [PATCH] style: modified font line height (#44) --- source/css/common/markdown.styl | 21 ++++++++------------- source/css/layout/article-content.styl | 6 ++---- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/source/css/common/markdown.styl b/source/css/common/markdown.styl index 61ad70c..93390a6 100644 --- a/source/css/common/markdown.styl +++ b/source/css/common/markdown.styl @@ -16,7 +16,7 @@ p { - line-height: 2rem; + line-height: 2; color: var(--default-text-color); } @@ -108,17 +108,20 @@ h1, h2, h3, h4, h5, h6 { color: var(--second-text-color); + line-height: 1.5; + + +keep-tablet() { + line-height: 1.25; + } } h1 { font-size: 1.8rem; font-weight: 600; - line-height: 1.2rem; +keep-tablet() { font-size: 1.7rem; - line-height: 1.1rem; } } @@ -126,11 +129,9 @@ h2 { font-size: 1.7rem; font-weight: 600; - line-height: 1.2rem; +keep-tablet() { font-size: 1.6rem; - line-height: 1.1rem; } } @@ -138,11 +139,9 @@ h3 { font-size: 1.6rem; font-weight: 550; - line-height: 1.16rem; +keep-tablet() { font-size: 1.5rem; - line-height: 1.06rem; } } @@ -150,11 +149,9 @@ h4 { font-size: 1.5rem; font-weight: 550; - line-height: 1.16rem; +keep-tablet() { font-size: 1.4rem; - line-height: 1.06rem; } } @@ -162,11 +159,9 @@ h5 { font-size: 1.28rem; font-weight: 500; - line-height: 1.12rem; +keep-tablet() { font-size: 1.18rem; - line-height: 1.02rem; } } @@ -174,11 +169,11 @@ h6 { font-size: 1.2rem; font-weight: 500; - line-height: 1.12rem; + line-height: 1.2; +keep-tablet() { font-size: 1.1rem; - line-height: 1.02rem; + line-height: 1.1; } } diff --git a/source/css/layout/article-content.styl b/source/css/layout/article-content.styl index c4c0f08..5e63870 100644 --- a/source/css/layout/article-content.styl +++ b/source/css/layout/article-content.styl @@ -88,7 +88,7 @@ $article-title-font-size = 1.6rem; .article-header, .article-header-meta-info { margin-top: 16px; +keep-tablet() { - transform: scale(0.88); + transform: scale(0.9); transform-origin: left top; } } @@ -97,11 +97,9 @@ $article-title-font-size = 1.6rem; .article-content { margin-top: $component-spacing-value; padding-bottom: 10px; - border-bottom: 1px solid var(--border-color); word-wrap: break-word; - text-align: justify; + border-bottom: 1px solid var(--border-color); color: var(--default-text-color); - } .post-copyright-info {